diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-07-20 16:09:16 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-07-20 16:09:16 +0800 |
commit | 204f956933371e80867606b2dc07aab06e82be12 (patch) | |
tree | cc9ccfbeae074bfcefa9570b86ffd51c7287a45e /net/sched/sch_red.c | |
parent | c863d9e9256315f6d91f866b95996e2c03052e12 (diff) | |
parent | 1d508e233d21a7848cf54d7d03b40dac2d9ea873 (diff) |
Merge branch 'linux-linaro-lsk-v4.1' into linux-linaro-lsk-v4.1-androidlsk-v4.1-16.07-android
Diffstat (limited to 'net/sched/sch_red.c')
-rw-r--r-- | net/sched/sch_red.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c index 6c0534cc7758..8c0508c0e287 100644 --- a/net/sched/sch_red.c +++ b/net/sched/sch_red.c @@ -210,7 +210,8 @@ static int red_change(struct Qdisc *sch, struct nlattr *opt) q->flags = ctl->flags; q->limit = ctl->limit; if (child) { - qdisc_tree_decrease_qlen(q->qdisc, q->qdisc->q.qlen); + qdisc_tree_reduce_backlog(q->qdisc, q->qdisc->q.qlen, + q->qdisc->qstats.backlog); qdisc_destroy(q->qdisc); q->qdisc = child; } @@ -313,12 +314,7 @@ static int red_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, if (new == NULL) new = &noop_qdisc; - sch_tree_lock(sch); - *old = q->qdisc; - q->qdisc = new; - qdisc_tree_decrease_qlen(*old, (*old)->q.qlen); - qdisc_reset(*old); - sch_tree_unlock(sch); + *old = qdisc_replace(sch, new, &q->qdisc); return 0; } |