Commit 88bebdf5 authored by Jason A. Donenfeld's avatar Jason A. Donenfeld Committed by David S. Miller

net: ipv4: 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 b950d8a5
...@@ -240,8 +240,8 @@ static int ip_finish_output2(struct net *net, struct sock *sk, struct sk_buff *s ...@@ -240,8 +240,8 @@ static int ip_finish_output2(struct net *net, struct sock *sk, struct sk_buff *s
static int ip_finish_output_gso(struct net *net, struct sock *sk, static int ip_finish_output_gso(struct net *net, struct sock *sk,
struct sk_buff *skb, unsigned int mtu) struct sk_buff *skb, unsigned int mtu)
{ {
struct sk_buff *segs, *nskb;
netdev_features_t features; netdev_features_t features;
struct sk_buff *segs;
int ret = 0; int ret = 0;
/* common case: seglen is <= mtu /* common case: seglen is <= mtu
...@@ -272,8 +272,7 @@ static int ip_finish_output_gso(struct net *net, struct sock *sk, ...@@ -272,8 +272,7 @@ static int ip_finish_output_gso(struct net *net, struct sock *sk,
consume_skb(skb); consume_skb(skb);
do { skb_list_walk_safe(segs, segs, nskb) {
struct sk_buff *nskb = segs->next;
int err; int err;
skb_mark_not_on_list(segs); skb_mark_not_on_list(segs);
...@@ -281,8 +280,7 @@ static int ip_finish_output_gso(struct net *net, struct sock *sk, ...@@ -281,8 +280,7 @@ static int ip_finish_output_gso(struct net *net, struct sock *sk,
if (err && ret == 0) if (err && ret == 0)
ret = err; ret = err;
segs = nskb; }
} while (segs);
return ret; return ret;
} }
......
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