aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_htb.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_htb.c')
-rw-r--r--net/sched/sch_htb.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 30c999c61b01..75a40951c4f2 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -524,7 +524,7 @@ htb_change_class_mode(struct htb_sched *q, struct htb_class *cl, long *diff)
524 */ 524 */
525static inline void htb_activate(struct htb_sched *q, struct htb_class *cl) 525static inline void htb_activate(struct htb_sched *q, struct htb_class *cl)
526{ 526{
527 BUG_TRAP(!cl->level && cl->un.leaf.q && cl->un.leaf.q->q.qlen); 527 WARN_ON(cl->level || !cl->un.leaf.q || !cl->un.leaf.q->q.qlen);
528 528
529 if (!cl->prio_activity) { 529 if (!cl->prio_activity) {
530 cl->prio_activity = 1 << (cl->un.leaf.aprio = cl->un.leaf.prio); 530 cl->prio_activity = 1 << (cl->un.leaf.aprio = cl->un.leaf.prio);
@@ -542,7 +542,7 @@ static inline void htb_activate(struct htb_sched *q, struct htb_class *cl)
542 */ 542 */
543static inline void htb_deactivate(struct htb_sched *q, struct htb_class *cl) 543static inline void htb_deactivate(struct htb_sched *q, struct htb_class *cl)
544{ 544{
545 BUG_TRAP(cl->prio_activity); 545 WARN_ON(!cl->prio_activity);
546 546
547 htb_deactivate_prios(q, cl); 547 htb_deactivate_prios(q, cl);
548 cl->prio_activity = 0; 548 cl->prio_activity = 0;
@@ -757,7 +757,7 @@ static struct htb_class *htb_lookup_leaf(struct rb_root *tree, int prio,
757 u32 *pid; 757 u32 *pid;
758 } stk[TC_HTB_MAXDEPTH], *sp = stk; 758 } stk[TC_HTB_MAXDEPTH], *sp = stk;
759 759
760 BUG_TRAP(tree->rb_node); 760 WARN_ON(!tree->rb_node);
761 sp->root = tree->rb_node; 761 sp->root = tree->rb_node;
762 sp->pptr = pptr; 762 sp->pptr = pptr;
763 sp->pid = pid; 763 sp->pid = pid;
@@ -777,7 +777,7 @@ static struct htb_class *htb_lookup_leaf(struct rb_root *tree, int prio,
777 *sp->pptr = (*sp->pptr)->rb_left; 777 *sp->pptr = (*sp->pptr)->rb_left;
778 if (sp > stk) { 778 if (sp > stk) {
779 sp--; 779 sp--;
780 BUG_TRAP(*sp->pptr); 780 WARN_ON(!*sp->pptr);
781 if (!*sp->pptr) 781 if (!*sp->pptr)
782 return NULL; 782 return NULL;
783 htb_next_rb_node(sp->pptr); 783 htb_next_rb_node(sp->pptr);
@@ -792,7 +792,7 @@ static struct htb_class *htb_lookup_leaf(struct rb_root *tree, int prio,
792 sp->pid = cl->un.inner.last_ptr_id + prio; 792 sp->pid = cl->un.inner.last_ptr_id + prio;
793 } 793 }
794 } 794 }
795 BUG_TRAP(0); 795 WARN_ON(1);
796 return NULL; 796 return NULL;
797} 797}
798 798
@@ -810,7 +810,7 @@ static struct sk_buff *htb_dequeue_tree(struct htb_sched *q, int prio,
810 810
811 do { 811 do {
812next: 812next:
813 BUG_TRAP(cl); 813 WARN_ON(!cl);
814 if (!cl) 814 if (!cl)
815 return NULL; 815 return NULL;
816 816
@@ -1185,7 +1185,7 @@ static void htb_parent_to_leaf(struct htb_sched *q, struct htb_class *cl,
1185{ 1185{
1186 struct htb_class *parent = cl->parent; 1186 struct htb_class *parent = cl->parent;
1187 1187
1188 BUG_TRAP(!cl->level && cl->un.leaf.q && !cl->prio_activity); 1188 WARN_ON(cl->level || !cl->un.leaf.q || cl->prio_activity);
1189 1189
1190 if (parent->cmode != HTB_CAN_SEND) 1190 if (parent->cmode != HTB_CAN_SEND)
1191 htb_safe_rb_erase(&parent->pq_node, q->wait_pq + parent->level); 1191 htb_safe_rb_erase(&parent->pq_node, q->wait_pq + parent->level);
@@ -1205,7 +1205,7 @@ static void htb_parent_to_leaf(struct htb_sched *q, struct htb_class *cl,
1205static void htb_destroy_class(struct Qdisc *sch, struct htb_class *cl) 1205static void htb_destroy_class(struct Qdisc *sch, struct htb_class *cl)
1206{ 1206{
1207 if (!cl->level) { 1207 if (!cl->level) {
1208 BUG_TRAP(cl->un.leaf.q); 1208 WARN_ON(!cl->un.leaf.q);
1209 qdisc_destroy(cl->un.leaf.q); 1209 qdisc_destroy(cl->un.leaf.q);
1210 } 1210 }
1211 gen_kill_estimator(&cl->bstats, &cl->rate_est); 1211 gen_kill_estimator(&cl->bstats, &cl->rate_est);