Skip to content

Commit 847c35c

Browse files
mdiewasmb49
authored andcommitted
UBUNTU: SAUCE: Revert "sch_htb: make htb_deactivate() idempotent"
BugLink: https://bugs.launchpad.net/bugs/2115252 This reverts commit ee9f651. Replace this patch with upstream version from stable branch linux-6.14.y since it includes additional changes. Signed-off-by: Manuel Diewald <[email protected]> Signed-off-by: Stefan Bader <[email protected]>
1 parent 3713e31 commit 847c35c

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

net/sched/sch_htb.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,7 @@ static void htb_add_to_wait_tree(struct htb_sched *q,
348348
*/
349349
static inline void htb_next_rb_node(struct rb_node **n)
350350
{
351-
if (*n)
352-
*n = rb_next(*n);
351+
*n = rb_next(*n);
353352
}
354353

355354
/**
@@ -610,8 +609,8 @@ static inline void htb_activate(struct htb_sched *q, struct htb_class *cl)
610609
*/
611610
static inline void htb_deactivate(struct htb_sched *q, struct htb_class *cl)
612611
{
613-
if (!cl->prio_activity)
614-
return;
612+
WARN_ON(!cl->prio_activity);
613+
615614
htb_deactivate_prios(q, cl);
616615
cl->prio_activity = 0;
617616
}
@@ -1741,7 +1740,8 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg,
17411740
if (cl->parent)
17421741
cl->parent->children--;
17431742

1744-
htb_deactivate(q, cl);
1743+
if (cl->prio_activity)
1744+
htb_deactivate(q, cl);
17451745

17461746
if (cl->cmode != HTB_CAN_SEND)
17471747
htb_safe_rb_erase(&cl->pq_node,
@@ -1949,7 +1949,8 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
19491949
/* turn parent into inner node */
19501950
qdisc_purge_queue(parent->leaf.q);
19511951
parent_qdisc = parent->leaf.q;
1952-
htb_deactivate(q, parent);
1952+
if (parent->prio_activity)
1953+
htb_deactivate(q, parent);
19531954

19541955
/* remove from evt list because of level change */
19551956
if (parent->cmode != HTB_CAN_SEND) {

0 commit comments

Comments
 (0)