From 8cf6005296c61ff46afcc1f08b1791b4aa2e9ba5 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Mon, 4 Dec 2006 12:18:43 +0100 Subject: remove garbage the sneaked into the ext3 fix Spotted by Thomas Voegtle. Signed-off-by: Adrian Bunk --- include/linux/skbuff.h | 15 --------------- net/ipv4/ip_output.c | 4 ++-- net/ipv6/ip6_output.c | 2 +- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 9a0e9e78933..7e631a54257 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -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; } -/** - * 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: buffer to orphan diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index b24c6a0c557..8dcba3887f0 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -946,7 +946,7 @@ alloc_new_skb: skb_prev->csum = csum_sub(skb_prev->csum, skb->csum); data += fraggap; - pskb_trim_unique(skb_prev, maxfraglen); + skb_trim(skb_prev, maxfraglen); } copy = datalen - transhdrlen - fraggap; @@ -1139,7 +1139,7 @@ ssize_t ip_append_page(struct sock *sk, struct page *page, data, fraggap, 0); skb_prev->csum = csum_sub(skb_prev->csum, skb->csum); - pskb_trim_unique(skb_prev, maxfraglen); + skb_trim(skb_prev, maxfraglen); } /* diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 1b528aa1320..5bf70b1442e 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -1046,7 +1046,7 @@ alloc_new_skb: skb_prev->csum = csum_sub(skb_prev->csum, skb->csum); data += fraggap; - pskb_trim_unique(skb_prev, maxfraglen); + skb_trim(skb_prev, maxfraglen); } copy = datalen - transhdrlen - fraggap; if (copy < 0) { -- cgit v1.2.3-18-g5258