Commit daf8d918 authored by Pedro Tammela's avatar Pedro Tammela Committed by Paolo Abeni

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: default avatarJamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: default avatarPedro Tammela <pctammela@mojatatu.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 8798481b
...@@ -149,8 +149,10 @@ static int drr_delete_class(struct Qdisc *sch, unsigned long arg, ...@@ -149,8 +149,10 @@ static int drr_delete_class(struct Qdisc *sch, unsigned long arg,
struct drr_sched *q = qdisc_priv(sch); struct drr_sched *q = qdisc_priv(sch);
struct drr_class *cl = (struct drr_class *)arg; 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; return -EBUSY;
}
sch_tree_lock(sch); sch_tree_lock(sch);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment