|
@@ -1269,9 +1269,9 @@ static void htb_destroy_filters(struct tcf_proto **fl)
|
|
static void htb_destroy_class(struct Qdisc *sch, struct htb_class *cl)
|
|
static void htb_destroy_class(struct Qdisc *sch, struct htb_class *cl)
|
|
{
|
|
{
|
|
struct htb_sched *q = qdisc_priv(sch);
|
|
struct htb_sched *q = qdisc_priv(sch);
|
|
|
|
+
|
|
if (!cl->level) {
|
|
if (!cl->level) {
|
|
BUG_TRAP(cl->un.leaf.q);
|
|
BUG_TRAP(cl->un.leaf.q);
|
|
- sch->q.qlen -= cl->un.leaf.q->q.qlen;
|
|
|
|
qdisc_destroy(cl->un.leaf.q);
|
|
qdisc_destroy(cl->un.leaf.q);
|
|
}
|
|
}
|
|
qdisc_put_rtab(cl->rate);
|
|
qdisc_put_rtab(cl->rate);
|
|
@@ -1334,6 +1334,11 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg)
|
|
/* delete from hash and active; remainder in destroy_class */
|
|
/* delete from hash and active; remainder in destroy_class */
|
|
hlist_del_init(&cl->hlist);
|
|
hlist_del_init(&cl->hlist);
|
|
|
|
|
|
|
|
+ if (!cl->level) {
|
|
|
|
+ sch->q.qlen -= cl->un.leaf.q->q.qlen;
|
|
|
|
+ qdisc_reset(cl->un.leaf.q);
|
|
|
|
+ }
|
|
|
|
+
|
|
if (cl->prio_activity)
|
|
if (cl->prio_activity)
|
|
htb_deactivate(q, cl);
|
|
htb_deactivate(q, cl);
|
|
|
|
|