summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/nfs/server/src/nlm4.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/xlators/nfs/server/src/nlm4.c b/xlators/nfs/server/src/nlm4.c
index 2e02a5836c8..4ee3596fd8f 100644
--- a/xlators/nfs/server/src/nlm4.c
+++ b/xlators/nfs/server/src/nlm4.c
@@ -2455,7 +2455,8 @@ nlm_priv (xlator_t *this)
gf_proc_dump_add_section("nfs.nlm");
- LOCK (&nlm_client_list_lk);
+ if (TRY_LOCK (&nlm_client_list_lk))
+ goto out;
list_for_each_entry (client, &nlm_client_list, nlm_clients) {
@@ -2478,7 +2479,15 @@ nlm_priv (xlator_t *this)
gf_proc_dump_build_key (key, "nlm", "client-count");
gf_proc_dump_write (key, "%d", client_count);
-
+ ret = 0;
UNLOCK (&nlm_client_list_lk);
+
+ out:
+ if (ret) {
+ gf_proc_dump_build_key (key, "nlm", "statedump_error");
+ gf_proc_dump_write (key, "Unable to dump nlm state because "
+ "nlm_client_list_lk lock couldn't be acquired");
+ }
+
return ret;
}