diff options
author | Pedro Tammela <pctammela@mojatatu.com> | 2023-07-28 17:35:36 +0200 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-08-01 10:47:24 +0200 |
commit | 7118f56e04d4f89318ad222e210ba70da19a8d15 (patch) | |
tree | f38fe026297cebea1216499b4ac4c61897dfcb8b /net/sched | |
parent | net/sched: sch_hfsc: warn about class in use while deleting (diff) | |
download | linux-7118f56e04d4f89318ad222e210ba70da19a8d15.tar.xz linux-7118f56e04d4f89318ad222e210ba70da19a8d15.zip |
net/sched: sch_htb: warn about class in use while deleting
Add extack to warn that delete was rejected because
the class is still in use
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_htb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 05c8291865ae..0d947414e616 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c @@ -1709,8 +1709,10 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg, * tc subsys guarantee us that in htb_destroy it holds no class * refs so that we can remove children safely there ? */ - if (cl->children || qdisc_class_in_use(&cl->common)) + if (cl->children || qdisc_class_in_use(&cl->common)) { + NL_SET_ERR_MSG(extack, "HTB class in use"); return -EBUSY; + } if (!cl->level && htb_parent_last_child(cl)) last_child = 1; |