aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_cbq.c7
-rw-r--r--net/sched/sch_drr.c7
-rw-r--r--net/sched/sch_hfsc.c7
-rw-r--r--net/sched/sch_htb.c7
4 files changed, 20 insertions, 8 deletions
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index 9e43ed949167..d728d8111732 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -1960,8 +1960,11 @@ static int cbq_delete(struct Qdisc *sch, unsigned long arg)
1960 cbq_rmprio(q, cl); 1960 cbq_rmprio(q, cl);
1961 sch_tree_unlock(sch); 1961 sch_tree_unlock(sch);
1962 1962
1963 if (--cl->refcnt == 0) 1963 BUG_ON(--cl->refcnt == 0);
1964 cbq_destroy_class(sch, cl); 1964 /*
1965 * This shouldn't happen: we "hold" one cops->get() when called
1966 * from tc_ctl_tclass; the destroy method is done from cops->put().
1967 */
1965 1968
1966 return 0; 1969 return 0;
1967} 1970}
diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c
index e36e94ab4e10..7597fe146866 100644
--- a/net/sched/sch_drr.c
+++ b/net/sched/sch_drr.c
@@ -155,8 +155,11 @@ static int drr_delete_class(struct Qdisc *sch, unsigned long arg)
155 drr_purge_queue(cl); 155 drr_purge_queue(cl);
156 qdisc_class_hash_remove(&q->clhash, &cl->common); 156 qdisc_class_hash_remove(&q->clhash, &cl->common);
157 157
158 if (--cl->refcnt == 0) 158 BUG_ON(--cl->refcnt == 0);
159 drr_destroy_class(sch, cl); 159 /*
160 * This shouldn't happen: we "hold" one cops->get() when called
161 * from tc_ctl_tclass; the destroy method is done from cops->put().
162 */
160 163
161 sch_tree_unlock(sch); 164 sch_tree_unlock(sch);
162 return 0; 165 return 0;
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 74226b265528..5022f9c1f34b 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -1139,8 +1139,11 @@ hfsc_delete_class(struct Qdisc *sch, unsigned long arg)
1139 hfsc_purge_queue(sch, cl); 1139 hfsc_purge_queue(sch, cl);
1140 qdisc_class_hash_remove(&q->clhash, &cl->cl_common); 1140 qdisc_class_hash_remove(&q->clhash, &cl->cl_common);
1141 1141
1142 if (--cl->refcnt == 0) 1142 BUG_ON(--cl->refcnt == 0);
1143 hfsc_destroy_class(sch, cl); 1143 /*
1144 * This shouldn't happen: we "hold" one cops->get() when called
1145 * from tc_ctl_tclass; the destroy method is done from cops->put().
1146 */
1144 1147
1145 sch_tree_unlock(sch); 1148 sch_tree_unlock(sch);
1146 return 0; 1149 return 0;
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 355974f610c5..88cd02626621 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -1275,8 +1275,11 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg)
1275 if (last_child) 1275 if (last_child)
1276 htb_parent_to_leaf(q, cl, new_q); 1276 htb_parent_to_leaf(q, cl, new_q);
1277 1277
1278 if (--cl->refcnt == 0) 1278 BUG_ON(--cl->refcnt == 0);
1279 htb_destroy_class(sch, cl); 1279 /*
1280 * This shouldn't happen: we "hold" one cops->get() when called
1281 * from tc_ctl_tclass; the destroy method is done from cops->put().
1282 */
1280 1283
1281 sch_tree_unlock(sch); 1284 sch_tree_unlock(sch);
1282 return 0; 1285 return 0;