aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_cbq.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_cbq.c')
-rw-r--r--net/sched/sch_cbq.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index 4efc836cbf38..37ae653db683 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -1744,12 +1744,13 @@ static void cbq_put(struct Qdisc *sch, unsigned long arg)
1744 1744
1745 if (--cl->refcnt == 0) { 1745 if (--cl->refcnt == 0) {
1746#ifdef CONFIG_NET_CLS_ACT 1746#ifdef CONFIG_NET_CLS_ACT
1747 spinlock_t *root_lock = qdisc_root_lock(sch);
1747 struct cbq_sched_data *q = qdisc_priv(sch); 1748 struct cbq_sched_data *q = qdisc_priv(sch);
1748 1749
1749 spin_lock_bh(&sch->dev_queue->lock); 1750 spin_lock_bh(root_lock);
1750 if (q->rx_class == cl) 1751 if (q->rx_class == cl)
1751 q->rx_class = NULL; 1752 q->rx_class = NULL;
1752 spin_unlock_bh(&sch->dev_queue->lock); 1753 spin_unlock_bh(root_lock);
1753#endif 1754#endif
1754 1755
1755 cbq_destroy_class(sch, cl); 1756 cbq_destroy_class(sch, cl);
@@ -1828,7 +1829,7 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **t
1828 1829
1829 if (tca[TCA_RATE]) 1830 if (tca[TCA_RATE])
1830 gen_replace_estimator(&cl->bstats, &cl->rate_est, 1831 gen_replace_estimator(&cl->bstats, &cl->rate_est,
1831 &sch->dev_queue->lock, 1832 qdisc_root_lock(sch),
1832 tca[TCA_RATE]); 1833 tca[TCA_RATE]);
1833 return 0; 1834 return 0;
1834 } 1835 }
@@ -1919,7 +1920,7 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **t
1919 1920
1920 if (tca[TCA_RATE]) 1921 if (tca[TCA_RATE])
1921 gen_new_estimator(&cl->bstats, &cl->rate_est, 1922 gen_new_estimator(&cl->bstats, &cl->rate_est,
1922 &sch->dev_queue->lock, tca[TCA_RATE]); 1923 qdisc_root_lock(sch), tca[TCA_RATE]);
1923 1924
1924 *arg = (unsigned long)cl; 1925 *arg = (unsigned long)cl;
1925 return 0; 1926 return 0;