Commit 2cec4448 authored by Jason A. Donenfeld's avatar Jason A. Donenfeld Committed by David S. Miller

net: openvswitch: use skb_list_walk_safe helper for gso segments

This is a straight-forward conversion case for the new function, keeping
the flow of the existing code as intact as possible.
Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c3b18e0d
...@@ -321,8 +321,7 @@ static int queue_gso_packets(struct datapath *dp, struct sk_buff *skb, ...@@ -321,8 +321,7 @@ static int queue_gso_packets(struct datapath *dp, struct sk_buff *skb,
} }
/* Queue all of the segments. */ /* Queue all of the segments. */
skb = segs; skb_list_walk_safe(segs, skb, nskb) {
do {
if (gso_type & SKB_GSO_UDP && skb != segs) if (gso_type & SKB_GSO_UDP && skb != segs)
key = &later_key; key = &later_key;
...@@ -330,17 +329,15 @@ static int queue_gso_packets(struct datapath *dp, struct sk_buff *skb, ...@@ -330,17 +329,15 @@ static int queue_gso_packets(struct datapath *dp, struct sk_buff *skb,
if (err) if (err)
break; break;
} while ((skb = skb->next)); }
/* Free all of the segments. */ /* Free all of the segments. */
skb = segs; skb_list_walk_safe(segs, skb, nskb) {
do {
nskb = skb->next;
if (err) if (err)
kfree_skb(skb); kfree_skb(skb);
else else
consume_skb(skb); consume_skb(skb);
} while ((skb = nskb)); }
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment