aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_api.c')
-rw-r--r--net/sched/sch_api.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 8aa9a0c5a9eb..d71f12be6e29 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -610,32 +610,6 @@ static u32 qdisc_alloc_handle(struct net_device *dev)
610 return i>0 ? autohandle : 0; 610 return i>0 ? autohandle : 0;
611} 611}
612 612
613/* Attach toplevel qdisc to device queue. */
614
615static struct Qdisc *dev_graft_qdisc(struct netdev_queue *dev_queue,
616 struct Qdisc *qdisc)
617{
618 struct Qdisc *oqdisc = dev_queue->qdisc_sleeping;
619 spinlock_t *root_lock;
620
621 root_lock = qdisc_lock(oqdisc);
622 spin_lock_bh(root_lock);
623
624 /* Prune old scheduler */
625 if (oqdisc && atomic_read(&oqdisc->refcnt) <= 1)
626 qdisc_reset(oqdisc);
627
628 /* ... and graft new one */
629 if (qdisc == NULL)
630 qdisc = &noop_qdisc;
631 dev_queue->qdisc_sleeping = qdisc;
632 rcu_assign_pointer(dev_queue->qdisc, &noop_qdisc);
633
634 spin_unlock_bh(root_lock);
635
636 return oqdisc;
637}
638
639void qdisc_tree_decrease_qlen(struct Qdisc *sch, unsigned int n) 613void qdisc_tree_decrease_qlen(struct Qdisc *sch, unsigned int n)
640{ 614{
641 const struct Qdisc_class_ops *cops; 615 const struct Qdisc_class_ops *cops;