aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/act_police.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/act_police.c')
-rw-r--r--net/sched/act_police.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index 580698db578a..3e8716dd738c 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -183,7 +183,6 @@ static int tcf_act_police_locate(struct rtattr *rta, struct rtattr *est,
183 ret = ACT_P_CREATED; 183 ret = ACT_P_CREATED;
184 police->tcf_refcnt = 1; 184 police->tcf_refcnt = 1;
185 spin_lock_init(&police->tcf_lock); 185 spin_lock_init(&police->tcf_lock);
186 police->tcf_stats_lock = &police->tcf_lock;
187 if (bind) 186 if (bind)
188 police->tcf_bindcnt = 1; 187 police->tcf_bindcnt = 1;
189override: 188override:
@@ -231,7 +230,7 @@ override:
231 if (est) 230 if (est)
232 gen_replace_estimator(&police->tcf_bstats, 231 gen_replace_estimator(&police->tcf_bstats,
233 &police->tcf_rate_est, 232 &police->tcf_rate_est,
234 police->tcf_stats_lock, est); 233 &police->tcf_lock, est);
235 234
236 spin_unlock_bh(&police->tcf_lock); 235 spin_unlock_bh(&police->tcf_lock);
237 if (ret != ACT_P_CREATED) 236 if (ret != ACT_P_CREATED)
@@ -450,7 +449,6 @@ struct tcf_police *tcf_police_locate(struct rtattr *rta, struct rtattr *est)
450 449
451 police->tcf_refcnt = 1; 450 police->tcf_refcnt = 1;
452 spin_lock_init(&police->tcf_lock); 451 spin_lock_init(&police->tcf_lock);
453 police->tcf_stats_lock = &police->tcf_lock;
454 if (parm->rate.rate) { 452 if (parm->rate.rate) {
455 police->tcfp_R_tab = 453 police->tcfp_R_tab =
456 qdisc_get_rtab(&parm->rate, tb[TCA_POLICE_RATE-1]); 454 qdisc_get_rtab(&parm->rate, tb[TCA_POLICE_RATE-1]);
@@ -490,7 +488,7 @@ struct tcf_police *tcf_police_locate(struct rtattr *rta, struct rtattr *est)
490 police->tcf_action = parm->action; 488 police->tcf_action = parm->action;
491 if (est) 489 if (est)
492 gen_new_estimator(&police->tcf_bstats, &police->tcf_rate_est, 490 gen_new_estimator(&police->tcf_bstats, &police->tcf_rate_est,
493 police->tcf_stats_lock, est); 491 &police->tcf_lock, est);
494 h = tcf_hash(police->tcf_index, POL_TAB_MASK); 492 h = tcf_hash(police->tcf_index, POL_TAB_MASK);
495 write_lock_bh(&police_lock); 493 write_lock_bh(&police_lock);
496 police->tcf_next = tcf_police_ht[h]; 494 police->tcf_next = tcf_police_ht[h];
@@ -591,7 +589,7 @@ int tcf_police_dump_stats(struct sk_buff *skb, struct tcf_police *police)
591 struct gnet_dump d; 589 struct gnet_dump d;
592 590
593 if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS, 591 if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS,
594 TCA_XSTATS, police->tcf_stats_lock, 592 TCA_XSTATS, &police->tcf_lock,
595 &d) < 0) 593 &d) < 0)
596 goto errout; 594 goto errout;
597 595