diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-09 01:57:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-09 01:57:31 -0400 |
commit | 68dfb42798e1eb2d42acbf872925cc75f1487d9b (patch) | |
tree | dc56b348077ca5f4e9a78f50fa04b198556f0abf /net/sched | |
parent | 816f3258e70db38d6d92c8d871377179fd69160f (diff) |
pkt_sched: Kill stats_lock member of struct Qdisc.
It is always equal to qdisc->dev_queue->lock
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_api.c | 9 | ||||
-rw-r--r-- | net/sched/sch_generic.c | 1 |
2 files changed, 4 insertions, 6 deletions
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) |