Whamcloud - gitweb
LU-3885 ldlm: check all errors during ldlm_proc_setup() 15/8115/2
authorDmitry Eremin <dmitry.eremin@intel.com>
Thu, 31 Oct 2013 12:35:25 +0000 (16:35 +0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 14 Nov 2013 23:17:13 +0000 (23:17 +0000)
Fix ignorig errors from lprocfs_add_vars() function.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ie2429f91ad5ac6de8d7e9027a0cd2907588294d3
Reviewed-on: http://review.whamcloud.com/8115
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/ldlm/ldlm_resource.c

index 559bfdb..e1b8787 100644 (file)
@@ -127,10 +127,16 @@ int ldlm_proc_setup(void)
                 GOTO(err_ns, rc);
         }
 
-        rc = lprocfs_add_vars(ldlm_type_proc_dir, list, NULL);
+       rc = lprocfs_add_vars(ldlm_type_proc_dir, list, NULL);
+       if (rc != 0) {
+               CERROR("LProcFS failed in ldlm-init\n");
+               GOTO(err_svc, rc);
+       }
 
-        RETURN(0);
+       RETURN(0);
 
+err_svc:
+       lprocfs_remove(&ldlm_svc_proc_dir);
 err_ns:
         lprocfs_remove(&ldlm_ns_proc_dir);
 err_type: