diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2016-02-26 01:55:00 +0300 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2016-08-23 00:38:15 +0300 |
commit | f2610da0605227b7fc4d6ffd499fa3c7ef16644e (patch) | |
tree | e611571ae96cd0be1ba77508831853f3ec4b76c3 /net/sched/sch_dsmark.c | |
parent | 4fecee0b8e513a4b3a05a3c07f5f1f487e1f361b (diff) | |
download | linux-f2610da0605227b7fc4d6ffd499fa3c7ef16644e.tar.xz |
net_sched: introduce qdisc_replace() helper
commit 86a7996cc8a078793670d82ed97d5a99bb4e8496 upstream.
Remove nearly duplicated code and prepare for the following patch.
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net/sched/sch_dsmark.c')
-rw-r--r-- | net/sched/sch_dsmark.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c index 49d6ef338b55..5b766242af94 100644 --- a/net/sched/sch_dsmark.c +++ b/net/sched/sch_dsmark.c @@ -67,13 +67,7 @@ static int dsmark_graft(struct Qdisc *sch, unsigned long arg, new = &noop_qdisc; } - sch_tree_lock(sch); - *old = p->q; - p->q = new; - qdisc_tree_decrease_qlen(*old, (*old)->q.qlen); - qdisc_reset(*old); - sch_tree_unlock(sch); - + *old = qdisc_replace(sch, new, &p->q); return 0; } |