Commit 8cf60052 authored by Adrian Bunk's avatar Adrian Bunk

remove garbage the sneaked into the ext3 fix

Spotted by Thomas Voegtle.
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
parent 8e0a9377
...@@ -997,21 +997,6 @@ static inline int pskb_trim(struct sk_buff *skb, unsigned int len) ...@@ -997,21 +997,6 @@ static inline int pskb_trim(struct sk_buff *skb, unsigned int len)
return (len < skb->len) ? __pskb_trim(skb, len) : 0; return (len < skb->len) ? __pskb_trim(skb, len) : 0;
} }
/**
* pskb_trim_unique - remove end from a paged unique (not cloned) buffer
* @skb: buffer to alter
* @len: new length
*
* This is identical to pskb_trim except that the caller knows that
* the skb is not cloned so we should never get an error due to out-
* of-memory.
*/
static inline void pskb_trim_unique(struct sk_buff *skb, unsigned int len)
{
int err = pskb_trim(skb, len);
BUG_ON(err);
}
/** /**
* skb_orphan - orphan a buffer * skb_orphan - orphan a buffer
* @skb: buffer to orphan * @skb: buffer to orphan
......
...@@ -946,7 +946,7 @@ int ip_append_data(struct sock *sk, ...@@ -946,7 +946,7 @@ int ip_append_data(struct sock *sk,
skb_prev->csum = csum_sub(skb_prev->csum, skb_prev->csum = csum_sub(skb_prev->csum,
skb->csum); skb->csum);
data += fraggap; data += fraggap;
pskb_trim_unique(skb_prev, maxfraglen); skb_trim(skb_prev, maxfraglen);
} }
copy = datalen - transhdrlen - fraggap; copy = datalen - transhdrlen - fraggap;
...@@ -1139,7 +1139,7 @@ ssize_t ip_append_page(struct sock *sk, struct page *page, ...@@ -1139,7 +1139,7 @@ ssize_t ip_append_page(struct sock *sk, struct page *page,
data, fraggap, 0); data, fraggap, 0);
skb_prev->csum = csum_sub(skb_prev->csum, skb_prev->csum = csum_sub(skb_prev->csum,
skb->csum); skb->csum);
pskb_trim_unique(skb_prev, maxfraglen); skb_trim(skb_prev, maxfraglen);
} }
/* /*
......
...@@ -1046,7 +1046,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, ...@@ -1046,7 +1046,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
skb_prev->csum = csum_sub(skb_prev->csum, skb_prev->csum = csum_sub(skb_prev->csum,
skb->csum); skb->csum);
data += fraggap; data += fraggap;
pskb_trim_unique(skb_prev, maxfraglen); skb_trim(skb_prev, maxfraglen);
} }
copy = datalen - transhdrlen - fraggap; copy = datalen - transhdrlen - fraggap;
if (copy < 0) { if (copy < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment