From b4cb26db3e6163aabf8e804578a25eaad8e3a45c Mon Sep 17 00:00:00 2001 From: Dmitry Eremin Date: Thu, 31 Oct 2013 16:35:25 +0400 Subject: [PATCH] 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 --- lustre/ldlm/ldlm_resource.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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: -- 1.8.3.1