summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorPedro Tammela <pctammela@mojatatu.com>2023-07-28 12:35:34 -0300
committerPaolo Abeni <pabeni@redhat.com>2023-08-01 10:47:24 +0200
commitdaf8d9181b9b4b58d3b182d1fea10dec75c5de88 (patch)
tree2a5e25774ce6ca47b1d9ef20cb8b507453c26326 /net/sched
parent8798481b667fa7c9bbd5aa843bf1557ada699964 (diff)
downloadlinux-daf8d9181b9b4b58d3b182d1fea10dec75c5de88.tar.gz
linux-daf8d9181b9b4b58d3b182d1fea10dec75c5de88.tar.bz2
linux-daf8d9181b9b4b58d3b182d1fea10dec75c5de88.zip
net/sched: sch_drr: 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_drr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c
index 1b22b3b741c9..19901e77cd3b 100644
--- a/net/sched/sch_drr.c
+++ b/net/sched/sch_drr.c
@@ -149,8 +149,10 @@ static int drr_delete_class(struct Qdisc *sch, unsigned long arg,
struct drr_sched *q = qdisc_priv(sch);
struct drr_class *cl = (struct drr_class *)arg;
- if (qdisc_class_in_use(&cl->common))
+ if (qdisc_class_in_use(&cl->common)) {
+ NL_SET_ERR_MSG(extack, "DRR class is in use");
return -EBUSY;
+ }
sch_tree_lock(sch);