Commit 9e2c96eb authored by Wang Shilong's avatar Wang Shilong Committed by Greg Kroah-Hartman

staging: lustre: ptlrpc: fix magic return value of ptlrpc_init_portals

Previously, when running 'modprobe lustre', it hit the following
error message which is becaue of network initialisation failure:
modprobe: ERROR: could not insert 'lustre': Input/output error

However, error code is there, just let it return to caller,
after this patch, error message will be something like:
modprobe: ERROR: could not insert 'lustre': Network is down
Signed-off-by: default avatarWang Shilong <wshilong@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5455
Reviewed-on: http://review.whamcloud.com/11337Reviewed-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: default avatarJames Simmons <uja.ornl@gmail.com>
Reviewed-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 691f8bfd
......@@ -543,7 +543,7 @@ static int ptlrpc_ni_init(void)
rc = LNetNIInit(pid);
if (rc < 0) {
CDEBUG(D_NET, "Can't init network interface: %d\n", rc);
return -ENOENT;
return rc;
}
/* CAVEAT EMPTOR: how we process portals events is _radically_
......@@ -561,7 +561,7 @@ static int ptlrpc_ni_init(void)
CERROR("Failed to allocate event queue: %d\n", rc);
LNetNIFini();
return -ENOMEM;
return rc;
}
int ptlrpc_init_portals(void)
......@@ -570,7 +570,7 @@ int ptlrpc_init_portals(void)
if (rc != 0) {
CERROR("network initialisation failed\n");
return -EIO;
return rc;
}
rc = ptlrpcd_addref();
if (rc == 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment