aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_htb.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2021-06-07 13:01:52 -0700
committerDavid S. Miller <davem@davemloft.net>2021-06-07 13:01:52 -0700
commit126285651b7f95282a0afe3a1b0221419b31d989 (patch)
treee5d547255814a5ed55b6b74be3155464598b39f2 /net/sched/sch_htb.c
parentsch_htb: fix doc warning in htb_lookup_leaf() (diff)
parentcxgb4: avoid link re-train during TC-MQPRIO configuration (diff)
downloadlinux-dev-126285651b7f95282a0afe3a1b0221419b31d989.tar.xz
linux-dev-126285651b7f95282a0afe3a1b0221419b31d989.zip
Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net
Bug fixes overlapping feature additions and refactoring, mostly. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_htb.c')
-rw-r--r--net/sched/sch_htb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 7a69e4e608c3..5f7ac27a5264 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -1523,7 +1523,8 @@ static void htb_parent_to_leaf_offload(struct Qdisc *sch,
struct Qdisc *old_q;
/* One ref for cl->leaf.q, the other for dev_queue->qdisc. */
- qdisc_refcount_inc(new_q);
+ if (new_q)
+ qdisc_refcount_inc(new_q);
old_q = htb_graft_helper(dev_queue, new_q);
WARN_ON(!(old_q->flags & TCQ_F_BUILTIN));
}
@@ -1710,10 +1711,9 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg,
cl->parent->common.classid,
NULL);
if (q->offload) {
- if (new_q) {
+ if (new_q)
htb_set_lockdep_class_child(new_q);
- htb_parent_to_leaf_offload(sch, dev_queue, new_q);
- }
+ htb_parent_to_leaf_offload(sch, dev_queue, new_q);
}
}