From: Dmitry Eremin Date: Thu, 31 Oct 2013 12:35:25 +0000 (+0400) Subject: LU-3885 ldlm: check all errors during ldlm_proc_setup() X-Git-Tag: 2.5.52~82 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=b4cb26db3e6163aabf8e804578a25eaad8e3a45c LU-3885 ldlm: check all errors during ldlm_proc_setup() Fix ignorig errors from lprocfs_add_vars() function. Signed-off-by: Dmitry Eremin Change-Id: Ie2429f91ad5ac6de8d7e9027a0cd2907588294d3 Reviewed-on: http://review.whamcloud.com/8115 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger --- diff --git a/lustre/ldlm/ldlm_resource.c b/lustre/ldlm/ldlm_resource.c index 559bfdb..e1b8787 100644 --- a/lustre/ldlm/ldlm_resource.c +++ b/lustre/ldlm/ldlm_resource.c @@ -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: