net/sched: Remove unnecessary WARNING condition for empty child qdisc in htb_activate
authorWilliam Liu <will@willsroot.io>
Tue, 19 Aug 2025 03:36:59 +0000 (03:36 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 21 Aug 2025 02:27:08 +0000 (19:27 -0700)
The WARN_ON trigger based on !cl->leaf.q->q.qlen is unnecessary in
htb_activate. htb_dequeue_tree already accounts for that scenario.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: William Liu <will@willsroot.io>
Reviewed-by: Savino Dicanosa <savy@syst3mfailure.io>
Link: https://patch.msgid.link/20250819033632.579854-1-will@willsroot.io
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/sched/sch_htb.c

index c968ea76377463d55eb445e467f37cd48c31050b..b5e40c51655a731e7c1879e4eb4932b9c1687ea5 100644 (file)
@@ -592,7 +592,7 @@ htb_change_class_mode(struct htb_sched *q, struct htb_class *cl, s64 *diff)
  */
 static inline void htb_activate(struct htb_sched *q, struct htb_class *cl)
 {
-       WARN_ON(cl->level || !cl->leaf.q || !cl->leaf.q->q.qlen);
+       WARN_ON(cl->level || !cl->leaf.q);
 
        if (!cl->prio_activity) {
                cl->prio_activity = 1 << cl->prio;