aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_generic.c')
-rw-r--r--net/sched/sch_generic.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 48be3d5c0d92..5078e0c5db8d 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -530,7 +530,6 @@ struct Qdisc_ops pfifo_fast_ops __read_mostly = {
530 .dump = pfifo_fast_dump, 530 .dump = pfifo_fast_dump,
531 .owner = THIS_MODULE, 531 .owner = THIS_MODULE,
532}; 532};
533EXPORT_SYMBOL(pfifo_fast_ops);
534 533
535static struct lock_class_key qdisc_tx_busylock; 534static struct lock_class_key qdisc_tx_busylock;
536 535
@@ -583,6 +582,9 @@ struct Qdisc *qdisc_create_dflt(struct netdev_queue *dev_queue,
583{ 582{
584 struct Qdisc *sch; 583 struct Qdisc *sch;
585 584
585 if (!try_module_get(ops->owner))
586 goto errout;
587
586 sch = qdisc_alloc(dev_queue, ops); 588 sch = qdisc_alloc(dev_queue, ops);
587 if (IS_ERR(sch)) 589 if (IS_ERR(sch))
588 goto errout; 590 goto errout;
@@ -686,7 +688,7 @@ static void attach_one_default_qdisc(struct net_device *dev,
686 688
687 if (dev->tx_queue_len) { 689 if (dev->tx_queue_len) {
688 qdisc = qdisc_create_dflt(dev_queue, 690 qdisc = qdisc_create_dflt(dev_queue,
689 &pfifo_fast_ops, TC_H_ROOT); 691 default_qdisc_ops, TC_H_ROOT);
690 if (!qdisc) { 692 if (!qdisc) {
691 netdev_info(dev, "activation failed\n"); 693 netdev_info(dev, "activation failed\n");
692 return; 694 return;
@@ -739,9 +741,8 @@ void dev_activate(struct net_device *dev)
739 int need_watchdog; 741 int need_watchdog;
740 742
741 /* No queueing discipline is attached to device; 743 /* No queueing discipline is attached to device;
742 create default one i.e. pfifo_fast for devices, 744 * create default one for devices, which need queueing
743 which need queueing and noqueue_qdisc for 745 * and noqueue_qdisc for virtual interfaces
744 virtual interfaces
745 */ 746 */
746 747
747 if (dev->qdisc == &noop_qdisc) 748 if (dev->qdisc == &noop_qdisc)