Skip to contentSkip to conversation

net: sched: don't set extack message in case the qdisc will be created

PATCH Applied Jiri Pirko 2 participants 2 messages Dec 28, 2017

Subsystems (3)
lore
Share & tools
lore

Jiri Pirko

author maintainer
#0 lore raw

PATCH 1/1 net: sched: don't set extack message in case the qdisc will be created

From: Jiri Pirko <[email protected]>

If the qdisc is not found here, it is going to be created. Therefore, this is not an error path. Remove the extack message set and don't confuse user with error message in case the qdisc was created successfully.

Fixes 09215598119e ("net: sched: sch_api: handle generic qdisc errors")
---
 net/sched/sch_api.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
net/sched/sch_api.c +1 -3
index 3a3a1da..81ecf5b 100644
@@ -1402,10 +1402,8 @@ static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n,
 					return -EINVAL;
 				}
 				q = qdisc_lookup(dev, tcm->tcm_handle);
-				if (!q) {
-					NL_SET_ERR_MSG(extack, "No qdisc found for specified handle");
+				if (!q)
 					goto create_n_graft;
-				}
 				if (n->nlmsg_flags & NLM_F_EXCL) {
 					NL_SET_ERR_MSG(extack, "Exclusivity flag on, cannot override");
 					return -EEXIST;
Signature · 1 line
2.9.5
maintainer Applied
#1 lore raw

From: Jiri Pirko <[email protected]>
Date: Thu, 28 Dec 2017 16:52:10 +0100

Quoted 9 lines

From: Jiri Pirko <[email protected]>

If the qdisc is not found here, it is going to be created. Therefore, this is not an error path. Remove the extack message set and don't confuse user with error message in case the qdisc was created successfully.

Fixes 09215598119e ("net: sched: sch_api: handle generic qdisc errors")

Applied.