diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-07-21 13:58:19 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-07-21 13:58:19 +0800 |
commit | 74b60e9f6f938d0cd4c7a71e583aee3cc6c5fbba (patch) | |
tree | 15cbca70f3f6d7e10da7d82154a78e6ca35dca8c /net/sched/sch_red.c | |
parent | f24f1475658431d60bcd4e6e5de951ba1663dd43 (diff) | |
parent | 1d508e233d21a7848cf54d7d03b40dac2d9ea873 (diff) |
Merge branch 'linux-linaro-lsk-v4.1' into linux-linaro-lsk-v4.1-rtlsk-v4.1-16.07-rt
Conflicts:
mm/swap.c
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; } |