diff options
-rw-r--r-- | include/net/sch_generic.h | 1 | ||||
-rw-r--r-- | net/sched/sch_api.c | 9 | ||||
-rw-r--r-- | net/sched/sch_generic.c | 1 |
3 files changed, 4 insertions, 7 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 66ec36d8ac97..ea71705e9c77 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -43,7 +43,6 @@ struct Qdisc | |||
43 | struct gnet_stats_basic bstats; | 43 | struct gnet_stats_basic bstats; |
44 | struct gnet_stats_queue qstats; | 44 | struct gnet_stats_queue qstats; |
45 | struct gnet_stats_rate_est rate_est; | 45 | struct gnet_stats_rate_est rate_est; |
46 | spinlock_t *stats_lock; | ||
47 | struct rcu_head q_rcu; | 46 | struct rcu_head q_rcu; |
48 | int (*reshape_fail)(struct sk_buff *skb, | 47 | int (*reshape_fail)(struct sk_buff *skb, |
49 | struct Qdisc *q); | 48 | struct Qdisc *q); |
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 4003c280b69f..e73bd68aa7ae 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -604,7 +604,6 @@ qdisc_create(struct net_device *dev, struct netdev_queue *dev_queue, | |||
604 | 604 | ||
605 | sch->parent = parent; | 605 | sch->parent = parent; |
606 | 606 | ||
607 | sch->stats_lock = &dev_queue->lock; | ||
608 | if (handle == TC_H_INGRESS) { | 607 | if (handle == TC_H_INGRESS) { |
609 | sch->flags |= TCQ_F_INGRESS; | 608 | sch->flags |= TCQ_F_INGRESS; |
610 | handle = TC_H_MAKE(TC_H_INGRESS, 0); | 609 | handle = TC_H_MAKE(TC_H_INGRESS, 0); |
@@ -622,7 +621,7 @@ qdisc_create(struct net_device *dev, struct netdev_queue *dev_queue, | |||
622 | if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS])) == 0) { | 621 | if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS])) == 0) { |
623 | if (tca[TCA_RATE]) { | 622 | if (tca[TCA_RATE]) { |
624 | err = gen_new_estimator(&sch->bstats, &sch->rate_est, | 623 | err = gen_new_estimator(&sch->bstats, &sch->rate_est, |
625 | sch->stats_lock, | 624 | &sch->dev_queue->lock, |
626 | tca[TCA_RATE]); | 625 | tca[TCA_RATE]); |
627 | if (err) { | 626 | if (err) { |
628 | /* | 627 | /* |
@@ -664,7 +663,7 @@ static int qdisc_change(struct Qdisc *sch, struct nlattr **tca) | |||
664 | } | 663 | } |
665 | if (tca[TCA_RATE]) | 664 | if (tca[TCA_RATE]) |
666 | gen_replace_estimator(&sch->bstats, &sch->rate_est, | 665 | gen_replace_estimator(&sch->bstats, &sch->rate_est, |
667 | sch->stats_lock, tca[TCA_RATE]); | 666 | &sch->dev_queue->lock, tca[TCA_RATE]); |
668 | return 0; | 667 | return 0; |
669 | } | 668 | } |
670 | 669 | ||
@@ -954,7 +953,7 @@ static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid, | |||
954 | q->qstats.qlen = q->q.qlen; | 953 | q->qstats.qlen = q->q.qlen; |
955 | 954 | ||
956 | if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS, | 955 | if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS, |
957 | TCA_XSTATS, q->stats_lock, &d) < 0) | 956 | TCA_XSTATS, &q->dev_queue->lock, &d) < 0) |
958 | goto nla_put_failure; | 957 | goto nla_put_failure; |
959 | 958 | ||
960 | if (q->ops->dump_stats && q->ops->dump_stats(q, &d) < 0) | 959 | if (q->ops->dump_stats && q->ops->dump_stats(q, &d) < 0) |
@@ -1203,7 +1202,7 @@ static int tc_fill_tclass(struct sk_buff *skb, struct Qdisc *q, | |||
1203 | goto nla_put_failure; | 1202 | goto nla_put_failure; |
1204 | 1203 | ||
1205 | if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS, | 1204 | if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS, |
1206 | TCA_XSTATS, q->stats_lock, &d) < 0) | 1205 | TCA_XSTATS, &q->dev_queue->lock, &d) < 0) |
1207 | goto nla_put_failure; | 1206 | goto nla_put_failure; |
1208 | 1207 | ||
1209 | if (cl_ops->dump_stats && cl_ops->dump_stats(q, cl, &d) < 0) | 1208 | if (cl_ops->dump_stats && cl_ops->dump_stats(q, cl, &d) < 0) |
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 3223e5ba76aa..dda78ee314ec 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -484,7 +484,6 @@ struct Qdisc * qdisc_create_dflt(struct net_device *dev, | |||
484 | sch = qdisc_alloc(dev_queue, ops); | 484 | sch = qdisc_alloc(dev_queue, ops); |
485 | if (IS_ERR(sch)) | 485 | if (IS_ERR(sch)) |
486 | goto errout; | 486 | goto errout; |
487 | sch->stats_lock = &dev_queue->lock; | ||
488 | sch->parent = parentid; | 487 | sch->parent = parentid; |
489 | 488 | ||
490 | if (!ops->init || ops->init(sch, NULL) == 0) | 489 | if (!ops->init || ops->init(sch, NULL) == 0) |