提交 c4264f27 编写于 作者: E Emmanuel Grumbach 提交者: David S. Miller

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: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c378a9c0
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册