diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-05-21 21:46:09 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-23 03:01:21 +0200 |
commit | c4264f27e83968ddfe3f0cfe7a33adfb320e1e42 (patch) | |
tree | 384806dfa9a6afe9e11d60bb82af2151323ec7be /include | |
parent | ipv4: Give backtrace in ip_rt_bug(). (diff) | |
download | linux-c4264f27e83968ddfe3f0cfe7a33adfb320e1e42.tar.xz linux-c4264f27e83968ddfe3f0cfe7a33adfb320e1e42.zip |
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 <emmanuel.grumbach@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/skbuff.h | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |