@@ -348,8 +348,7 @@ static void htb_add_to_wait_tree(struct htb_sched *q,
348
348
*/
349
349
static inline void htb_next_rb_node (struct rb_node * * n )
350
350
{
351
- if (* n )
352
- * n = rb_next (* n );
351
+ * n = rb_next (* n );
353
352
}
354
353
355
354
/**
@@ -610,8 +609,8 @@ static inline void htb_activate(struct htb_sched *q, struct htb_class *cl)
610
609
*/
611
610
static inline void htb_deactivate (struct htb_sched * q , struct htb_class * cl )
612
611
{
613
- if (!cl -> prio_activity )
614
- return ;
612
+ WARN_ON (!cl -> prio_activity );
613
+
615
614
htb_deactivate_prios (q , cl );
616
615
cl -> prio_activity = 0 ;
617
616
}
@@ -1741,7 +1740,8 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg,
1741
1740
if (cl -> parent )
1742
1741
cl -> parent -> children -- ;
1743
1742
1744
- htb_deactivate (q , cl );
1743
+ if (cl -> prio_activity )
1744
+ htb_deactivate (q , cl );
1745
1745
1746
1746
if (cl -> cmode != HTB_CAN_SEND )
1747
1747
htb_safe_rb_erase (& cl -> pq_node ,
@@ -1949,7 +1949,8 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
1949
1949
/* turn parent into inner node */
1950
1950
qdisc_purge_queue (parent -> leaf .q );
1951
1951
parent_qdisc = parent -> leaf .q ;
1952
- htb_deactivate (q , parent );
1952
+ if (parent -> prio_activity )
1953
+ htb_deactivate (q , parent );
1953
1954
1954
1955
/* remove from evt list because of level change */
1955
1956
if (parent -> cmode != HTB_CAN_SEND ) {
0 commit comments