diff options
author | David S. Miller <davem@davemloft.net> | 2018-07-30 06:42:53 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-10 20:06:54 +0300 |
commit | a8305bff685252e80b7c60f4f5e7dd2e63e38218 (patch) | |
tree | 3f8f073a642ad27c0921917e3b9e1622b9956478 /net/xfrm | |
parent | 776f07ee303a5e13970cbfaed767e28cbab4002f (diff) | |
download | linux-a8305bff685252e80b7c60f4f5e7dd2e63e38218.tar.xz |
net: Add and use skb_mark_not_on_list().
An SKB is not on a list if skb->next is NULL.
Codify this convention into a helper function and use it
where we are dequeueing an SKB and need to mark it as such.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_device.c | 2 | ||||
-rw-r--r-- | net/xfrm/xfrm_output.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/xfrm/xfrm_device.c b/net/xfrm/xfrm_device.c index 5611b7521020..260fbba4f03e 100644 --- a/net/xfrm/xfrm_device.c +++ b/net/xfrm/xfrm_device.c @@ -99,7 +99,7 @@ struct sk_buff *validate_xmit_xfrm(struct sk_buff *skb, netdev_features_t featur do { struct sk_buff *nskb = skb2->next; - skb2->next = NULL; + skb_mark_not_on_list(skb2); xo = xfrm_offload(skb2); xo->flags |= XFRM_DEV_RESUME; diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c index 45ba07ab3e4f..2d42cb0c94b8 100644 --- a/net/xfrm/xfrm_output.c +++ b/net/xfrm/xfrm_output.c @@ -189,7 +189,7 @@ static int xfrm_output_gso(struct net *net, struct sock *sk, struct sk_buff *skb struct sk_buff *nskb = segs->next; int err; - segs->next = NULL; + skb_mark_not_on_list(segs); err = xfrm_output2(net, sk, segs); if (unlikely(err)) { |