From eb65d01791f0f85e9c9e7d5f71593282970cea51 Mon Sep 17 00:00:00 2001 From: Changli Gao Date: Sat, 29 May 2010 00:12:13 -0700 Subject: [PATCH] --- yaml --- r: 199458 b: refs/heads/master c: 5b0daa3474d52bed906c4d5e92b44e10148c6972 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/skbuff.h | 2 +- trunk/net/core/skbuff.c | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 1971226d0e08..ca9d909e0705 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6057fd78a8dcce6269f029b967051d5a2e9b0895 +refs/heads/master: 5b0daa3474d52bed906c4d5e92b44e10148c6972 diff --git a/trunk/include/linux/skbuff.h b/trunk/include/linux/skbuff.h index 7cdfb4d52847..bf243fc54959 100644 --- a/trunk/include/linux/skbuff.h +++ b/trunk/include/linux/skbuff.h @@ -501,7 +501,7 @@ static inline struct sk_buff *alloc_skb_fclone(unsigned int size, return __alloc_skb(size, priority, 1, -1); } -extern int skb_recycle_check(struct sk_buff *skb, int skb_size); +extern bool skb_recycle_check(struct sk_buff *skb, int skb_size); extern struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src); extern struct sk_buff *skb_clone(struct sk_buff *skb, diff --git a/trunk/net/core/skbuff.c b/trunk/net/core/skbuff.c index 4c11000a96aa..4667d4d7c162 100644 --- a/trunk/net/core/skbuff.c +++ b/trunk/net/core/skbuff.c @@ -482,22 +482,22 @@ EXPORT_SYMBOL(consume_skb); * reference count dropping and cleans up the skbuff as if it * just came from __alloc_skb(). */ -int skb_recycle_check(struct sk_buff *skb, int skb_size) +bool skb_recycle_check(struct sk_buff *skb, int skb_size) { struct skb_shared_info *shinfo; if (irqs_disabled()) - return 0; + return false; if (skb_is_nonlinear(skb) || skb->fclone != SKB_FCLONE_UNAVAILABLE) - return 0; + return false; skb_size = SKB_DATA_ALIGN(skb_size + NET_SKB_PAD); if (skb_end_pointer(skb) - skb->head < skb_size) - return 0; + return false; if (skb_shared(skb) || skb_cloned(skb)) - return 0; + return false; skb_release_head_state(skb); @@ -509,7 +509,7 @@ int skb_recycle_check(struct sk_buff *skb, int skb_size) skb->data = skb->head + NET_SKB_PAD; skb_reset_tail_pointer(skb); - return 1; + return true; } EXPORT_SYMBOL(skb_recycle_check);