diff options
author | Sabrina Dubroca <sd@queasysnail.net> | 2014-10-21 05:23:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-21 21:45:21 -0400 |
commit | 7c1c97d54f9bfc810908d3903cb8bcacf734df18 (patch) | |
tree | 50a5b0c0ccbf50d5a6190909ea305aa5f42e96b2 /net/sched | |
parent | 32bf08a6257b9c7380dcd040af3c0858eee3ef05 (diff) |
net: sched: initialize bstats syncp
Use netdev_alloc_pcpu_stats to allocate percpu stats and initialize syncp.
Fixes: 22e0f8b9322c "net: sched: make bstats per cpu and estimator RCU safe"
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Acked-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 2cf61b3e633c..76f402e05bd6 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -947,7 +947,7 @@ qdisc_create(struct net_device *dev, struct netdev_queue *dev_queue, | |||
947 | if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS])) == 0) { | 947 | if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS])) == 0) { |
948 | if (qdisc_is_percpu_stats(sch)) { | 948 | if (qdisc_is_percpu_stats(sch)) { |
949 | sch->cpu_bstats = | 949 | sch->cpu_bstats = |
950 | alloc_percpu(struct gnet_stats_basic_cpu); | 950 | netdev_alloc_pcpu_stats(struct gnet_stats_basic_cpu); |
951 | if (!sch->cpu_bstats) | 951 | if (!sch->cpu_bstats) |
952 | goto err_out4; | 952 | goto err_out4; |
953 | 953 | ||