aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sched/sch_htb.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 4b52fa78935a..08fa4d083615 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -1269,9 +1269,9 @@ static void htb_destroy_filters(struct tcf_proto **fl)
1269static void htb_destroy_class(struct Qdisc *sch, struct htb_class *cl) 1269static void htb_destroy_class(struct Qdisc *sch, struct htb_class *cl)
1270{ 1270{
1271 struct htb_sched *q = qdisc_priv(sch); 1271 struct htb_sched *q = qdisc_priv(sch);
1272
1272 if (!cl->level) { 1273 if (!cl->level) {
1273 BUG_TRAP(cl->un.leaf.q); 1274 BUG_TRAP(cl->un.leaf.q);
1274 sch->q.qlen -= cl->un.leaf.q->q.qlen;
1275 qdisc_destroy(cl->un.leaf.q); 1275 qdisc_destroy(cl->un.leaf.q);
1276 } 1276 }
1277 qdisc_put_rtab(cl->rate); 1277 qdisc_put_rtab(cl->rate);
@@ -1334,6 +1334,11 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg)
1334 /* delete from hash and active; remainder in destroy_class */ 1334 /* delete from hash and active; remainder in destroy_class */
1335 hlist_del_init(&cl->hlist); 1335 hlist_del_init(&cl->hlist);
1336 1336
1337 if (!cl->level) {
1338 sch->q.qlen -= cl->un.leaf.q->q.qlen;
1339 qdisc_reset(cl->un.leaf.q);
1340 }
1341
1337 if (cl->prio_activity) 1342 if (cl->prio_activity)
1338 htb_deactivate(q, cl); 1343 htb_deactivate(q, cl);
1339 1344