From 4aa71267cc0317e126843509f1c5b237f469414b Mon Sep 17 00:00:00 2001 From: Olaf Faaland Date: Fri, 2 Aug 2019 09:38:50 -0700 Subject: [PATCH] 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 --- lnet/lnet/api-ni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 1.8.3.1