Whamcloud - gitweb
LU-3808 ptlrpc: Return a meaningful status from ptlrpcd_init()
[fs/lustre-release.git] / lustre / mgc / mgc_request.c
index 4ea58a0..5c130be 100644 (file)
@@ -888,11 +888,13 @@ static int mgc_cleanup(struct obd_device *obd)
 
 static int mgc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
 {
-        struct lprocfs_static_vars lvars;
-        int rc;
+       struct lprocfs_static_vars      lvars;
+       int                             rc;
         ENTRY;
 
-        ptlrpcd_addref();
+       rc = ptlrpcd_addref();
+       if (rc < 0)
+               RETURN(rc);
 
         rc = client_obd_setup(obd, lcfg);
         if (rc)