From: Fan Du <fan.du@windriver.com>
To: <jesse@nicira.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>
Subject: [PATCH] openvswitch: use -EEXIST as return error to be more precise
Date: Tue, 28 May 2013 14:31:16 +0800 [thread overview]
Message-ID: <1369722676-7898-1-git-send-email-fan.du@windriver.com> (raw)
ovs_vport_cmd_new create a new vport with port num specified by user.
when this port num is already occupied, it's more clear to return
-EEXIST as the reason than -EBUSY.
Signed-off-by: Fan Du <fan.du@windriver.com>
---
net/openvswitch/datapath.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index d12d6b8..1e31095 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -1755,7 +1755,7 @@ static int ovs_vport_cmd_new(struct sk_buff *skb, struct genl_info *info)
goto exit_unlock;
vport = ovs_vport_ovsl(dp, port_no);
- err = -EBUSY;
+ err = -EEXIST;
if (vport)
goto exit_unlock;
} else {
--
1.7.1
next reply other threads:[~2013-05-28 6:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-28 6:31 Fan Du [this message]
2013-05-29 6:50 ` [PATCH] openvswitch: use -EEXIST as return error to be more precise David Miller
2013-05-29 18:02 ` Jesse Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369722676-7898-1-git-send-email-fan.du@windriver.com \
--to=fan.du@windriver.com \
--cc=davem@davemloft.net \
--cc=jesse@nicira.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).