staging: lustre: ldlm: check all errors during ldlm_debugfs_setup()
authorDmitry Eremin <dmitry.eremin@intel.com>
Thu, 28 Apr 2016 01:37:13 +0000 (21:37 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Apr 2016 04:53:18 +0000 (21:53 -0700)
Fix ignoring errors from ldebugfs_add_vars() function.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3885
Reviewed-on: http://review.whamcloud.com/8115
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>
drivers/staging/lustre/lustre/ldlm/ldlm_resource.c

index 475fabb3c8a1df7da2e06011a6bee7dc5a3914a6..e99c89c34cd0148e37f067308be1e33de799a2f2 100644 (file)
@@ -124,9 +124,15 @@ int ldlm_debugfs_setup(void)
        }
 
        rc = ldebugfs_add_vars(ldlm_debugfs_dir, ldlm_debugfs_list, NULL);
+       if (rc) {
+               CERROR("LProcFS failed in ldlm-init\n");
+               goto err_svc;
+       }
 
        return 0;
 
+err_svc:
+       ldebugfs_remove(&ldlm_svc_debugfs_dir);
 err_ns:
        ldebugfs_remove(&ldlm_ns_debugfs_dir);
 err_type: