projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c378a9c
)
net: skb_trim explicitely check the linearity instead of data_len
author
Emmanuel Grumbach
<emmanuel.grumbach@intel.com>
Sat, 21 May 2011 19:46:09 +0000
(19:46 +0000)
committer
David S. Miller
<davem@davemloft.net>
Mon, 23 May 2011 01:01:21 +0000
(21:01 -0400)
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>
include/linux/skbuff.h
patch
|
blob
|
history
diff --git
a/include/linux/skbuff.h
b/include/linux/skbuff.h
index 8cac356b77b2589146ab2a9c6131f81d970c45fa..aeaad97e6815bd6884d0ec0f93c3fb7646485475 100644
(file)
--- 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;
}