diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2016-02-26 01:55:00 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-19 03:06:39 +0300 |
commit | 1188e1403a772d9698c06bcc53c44783536ff09e (patch) | |
tree | ab35ab1d01739e289a4dee4ca76d16f910801bf9 /net/sched/sch_qfq.c | |
parent | c985780791efec375865c0fbd21794d631c68fce (diff) | |
download | linux-1188e1403a772d9698c06bcc53c44783536ff09e.tar.xz |
net_sched: introduce qdisc_replace() helper
[ Upstream commit 86a7996cc8a078793670d82ed97d5a99bb4e8496 ]
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/sched/sch_qfq.c')
-rw-r--r-- | net/sched/sch_qfq.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c index 3dc3a6e56052..b5c52caf2e73 100644 --- a/net/sched/sch_qfq.c +++ b/net/sched/sch_qfq.c @@ -617,11 +617,7 @@ static int qfq_graft_class(struct Qdisc *sch, unsigned long arg, new = &noop_qdisc; } - sch_tree_lock(sch); - qfq_purge_queue(cl); - *old = cl->qdisc; - cl->qdisc = new; - sch_tree_unlock(sch); + *old = qdisc_replace(sch, new, &cl->qdisc); return 0; } |