aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_htb.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_htb.c')
-rw-r--r--net/sched/sch_htb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 83f5e69243c1..3a119f576bb3 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -1100,7 +1100,9 @@ static int htb_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
1100 == NULL) 1100 == NULL)
1101 return -ENOBUFS; 1101 return -ENOBUFS;
1102 sch_tree_lock(sch); 1102 sch_tree_lock(sch);
1103 if ((*old = xchg(&cl->un.leaf.q, new)) != NULL) { 1103 *old = cl->un.leaf.q;
1104 cl->un.leaf.q = new;
1105 if (*old != NULL) {
1104 qdisc_tree_decrease_qlen(*old, (*old)->q.qlen); 1106 qdisc_tree_decrease_qlen(*old, (*old)->q.qlen);
1105 qdisc_reset(*old); 1107 qdisc_reset(*old);
1106 } 1108 }