From: Olaf Faaland Date: Fri, 2 Aug 2019 16:38:50 +0000 (-0700) Subject: LU-12626 lnet: create existing net returns EEXIST X-Git-Tag: 2.12.57~11 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F81%2F35681%2F2;p=fs%2Flustre-release.git LU-12626 lnet: create existing net returns EEXIST When "lnetctl net add" is called for an interface/net pair that already exists, the error returned should be EEXIST, so the user knows that the net is already configured. Signed-off-by: Olaf Faaland Change-Id: Idab79ab288a11a2920793f27df235b4dfab497fe Reviewed-on: https://review.whamcloud.com/35681 Tested-by: jenkins Reviewed-by: Chris Horn Reviewed-by: Amir Shehata Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index 99fda25..d50c939 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -2388,7 +2388,7 @@ lnet_startup_lndnet(struct lnet_net *net, struct lnet_lnd_tunables *tun) * up is actually unique. if it's not fail. */ if (!lnet_ni_unique_net(&net_l->net_ni_list, ni->ni_interfaces[0])) { - rc = -EINVAL; + rc = -EEXIST; goto failed1; }