From: Emmanuel Grumbach Date: Sat, 21 May 2011 19:46:09 +0000 (+0000) Subject: net: skb_trim explicitely check the linearity instead of data_len X-Git-Tag: upstream/snapshot3+hdmi~10360^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4264f27e83968ddfe3f0cfe7a33adfb320e1e42;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git net: skb_trim explicitely check the linearity instead of data_len The purpose of the check on data_len is to check linearity, so use the inline helper for this. No overhead and more explicit. Signed-off-by: Emmanuel Grumbach Signed-off-by: David S. Miller --- diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 8cac356..aeaad97 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -1442,7 +1442,7 @@ extern int ___pskb_trim(struct sk_buff *skb, unsigned int len); static inline void __skb_trim(struct sk_buff *skb, unsigned int len) { - if (unlikely(skb->data_len)) { + if (unlikely(skb_is_nonlinear(skb))) { WARN_ON(1); return; }