]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/sched/sch_drr.c
net_sched: introduce qdisc_replace() helper
[mirror_ubuntu-artful-kernel.git] / net / sched / sch_drr.c
index a1cd778240cd7f2b14336c26ba6eec282c1c60b6..b96c9a8e70abca3b7a0a331d76b7baeebfadc59d 100644 (file)
@@ -226,11 +226,7 @@ static int drr_graft_class(struct Qdisc *sch, unsigned long arg,
                        new = &noop_qdisc;
        }
 
-       sch_tree_lock(sch);
-       drr_purge_queue(cl);
-       *old = cl->qdisc;
-       cl->qdisc = new;
-       sch_tree_unlock(sch);
+       *old = qdisc_replace(sch, new, &cl->qdisc);
        return 0;
 }