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: firefly_0821_release~7613^2~1341^2~7 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c4264f27e83968ddfe3f0cfe7a33adfb320e1e42;p=firefly-linux-kernel-4.4.55.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 8cac356b77b2..aeaad97e6815 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; }