diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-01-14 00:42:30 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-14 20:48:41 +0100 |
commit | b950d8a5b300ceeb2e530291cddc6b3e547291f0 (patch) | |
tree | f6dfce64d682a289d384a8e926fbc409b5b8d1d0 /net/sched/sch_cake.c | |
parent | net: openvswitch: use skb_list_walk_safe helper for gso segments (diff) | |
download | linux-b950d8a5b300ceeb2e530291cddc6b3e547291f0.tar.xz linux-b950d8a5b300ceeb2e530291cddc6b3e547291f0.zip |
net: sched: 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: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_cake.c')
-rw-r--r-- | net/sched/sch_cake.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c index 90ef7cc79b69..1496e87cd07b 100644 --- a/net/sched/sch_cake.c +++ b/net/sched/sch_cake.c @@ -1682,8 +1682,7 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch, if (IS_ERR_OR_NULL(segs)) return qdisc_drop(skb, sch, to_free); - while (segs) { - nskb = segs->next; + skb_list_walk_safe(segs, segs, nskb) { skb_mark_not_on_list(segs); qdisc_skb_cb(segs)->pkt_len = segs->len; cobalt_set_enqueue_time(segs, now); @@ -1696,7 +1695,6 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch, slen += segs->len; q->buffer_used += segs->truesize; b->packets++; - segs = nskb; } /* stats */ |