diff options
author | Swapnil Pimpale <spimpale@ddn.com> | 2016-04-12 16:14:09 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-26 15:13:13 -0700 |
commit | cc3b77589617b32c4fe610d9d6302a159f1fde13 (patch) | |
tree | be3c6c74ceb2eb7a5290ccc2014c7445802d83f6 /drivers/staging/lustre/lustre/mgc | |
parent | staging: lustre: obd: MDT mount fails on MDS w/o MGS on it (diff) | |
download | linux-dev-cc3b77589617b32c4fe610d9d6302a159f1fde13.tar.xz linux-dev-cc3b77589617b32c4fe610d9d6302a159f1fde13.zip |
staging: lustre: ptlrpc: return a meaningful status from ptlrpcd_init()
This patch has the following:
1) Fix for the return value from ptlrpcd_init(). It will now return a
correct status instead of returning zero always.
2) ptlrpcd_addref() should not increment ptlrpcd_users on error.
3) Added code in a mdc_setup() and mgc_setup() to test the return
value of ptlrpcd_addref() and return on error.
Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3808
Reviewed-on: http://review.whamcloud.com/7522
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/mgc')
-rw-r--r-- | drivers/staging/lustre/lustre/mgc/mgc_request.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c index 0c3bd1648a88..933f6f628350 100644 --- a/drivers/staging/lustre/lustre/mgc/mgc_request.c +++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c @@ -734,7 +734,9 @@ static int mgc_setup(struct obd_device *obd, struct lustre_cfg *lcfg) struct task_struct *task; int rc; - ptlrpcd_addref(); + rc = ptlrpcd_addref(); + if (rc < 0) + goto err_noref; rc = client_obd_setup(obd, lcfg); if (rc) @@ -773,6 +775,7 @@ err_cleanup: client_obd_cleanup(obd); err_decref: ptlrpcd_decref(); +err_noref: return rc; } |