aboutsummaryrefslogtreecommitdiff
path: root/net/sched/sch_hfsc.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-05-20 12:16:37 +0800
committerAlex Shi <alex.shi@linaro.org>2016-05-20 12:16:37 +0800
commit510d0a3f869611dcd001a2b7627fa5dded4579af (patch)
treeba06ce27af2f3aa194a268e3f26f0665c21357a9 /net/sched/sch_hfsc.c
parente37ddf27108a992e191b27df9bd532cb9157dc89 (diff)
parent544ec5b08d007f184ab97abdbed87e613c8c0b83 (diff)
Merge tag 'v4.4.11' into linux-linaro-lsk-v4.4lsk-v4.4-16.05
This is the 4.4.11 stable release
Diffstat (limited to 'net/sched/sch_hfsc.c')
-rw-r--r--net/sched/sch_hfsc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index b7ebe2c87586..d783d7cc3348 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -895,9 +895,10 @@ static void
hfsc_purge_queue(struct Qdisc *sch, struct hfsc_class *cl)
{
unsigned int len = cl->qdisc->q.qlen;
+ unsigned int backlog = cl->qdisc->qstats.backlog;
qdisc_reset(cl->qdisc);
- qdisc_tree_decrease_qlen(cl->qdisc, len);
+ qdisc_tree_reduce_backlog(cl->qdisc, len, backlog);
}
static void
@@ -1215,11 +1216,7 @@ hfsc_graft_class(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
new = &noop_qdisc;
}
- sch_tree_lock(sch);
- hfsc_purge_queue(sch, cl);
- *old = cl->qdisc;
- cl->qdisc = new;
- sch_tree_unlock(sch);
+ *old = qdisc_replace(sch, new, &cl->qdisc);
return 0;
}