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

net_sched: sch_htb: defer skb freeing

Both htb_reset() and htb_destroy() can use __qdisc_reset_queue()
instead of __skb_queue_purge() to defer skb freeing of internal
queues.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e7e424cd
...@@ -957,7 +957,7 @@ static void htb_reset(struct Qdisc *sch) ...@@ -957,7 +957,7 @@ static void htb_reset(struct Qdisc *sch)
} }
} }
qdisc_watchdog_cancel(&q->watchdog); qdisc_watchdog_cancel(&q->watchdog);
__skb_queue_purge(&q->direct_queue); __qdisc_reset_queue(&q->direct_queue);
sch->q.qlen = 0; sch->q.qlen = 0;
sch->qstats.backlog = 0; sch->qstats.backlog = 0;
memset(q->hlevel, 0, sizeof(q->hlevel)); memset(q->hlevel, 0, sizeof(q->hlevel));
...@@ -1231,7 +1231,7 @@ static void htb_destroy(struct Qdisc *sch) ...@@ -1231,7 +1231,7 @@ static void htb_destroy(struct Qdisc *sch)
htb_destroy_class(sch, cl); htb_destroy_class(sch, cl);
} }
qdisc_class_hash_destroy(&q->clhash); qdisc_class_hash_destroy(&q->clhash);
__skb_queue_purge(&q->direct_queue); __qdisc_reset_queue(&q->direct_queue);
} }
static int htb_delete(struct Qdisc *sch, unsigned long arg) static int htb_delete(struct Qdisc *sch, unsigned long arg)
......
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