Commit 2f08a9a1 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

net_sched: sch_netem: defer skb freeing

rtnl_kfree_skbs() can be used in tfifo_reset()

It would be nice if we could iterate through rb tree instead
of removing one skb at a time, and build a single skb chain.
But this is left for a future patch.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a5a9f534
...@@ -368,9 +368,7 @@ static void tfifo_reset(struct Qdisc *sch) ...@@ -368,9 +368,7 @@ static void tfifo_reset(struct Qdisc *sch)
struct sk_buff *skb = netem_rb_to_skb(p); struct sk_buff *skb = netem_rb_to_skb(p);
rb_erase(p, &q->t_root); rb_erase(p, &q->t_root);
skb->next = NULL; rtnl_kfree_skbs(skb, skb);
skb->prev = NULL;
kfree_skb(skb);
} }
} }
......
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