mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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>
This commit is contained in:
parent
8e4553ef3e
commit
7118f56e04
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user