From 500a656c91558dd7913f572369f20b8550e9e98d Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Sat, 19 Apr 2014 20:03:38 +0530 Subject: features/locks: Remove stale inodelk objects from 'blocked_locks' list * In the event of a DISCONNECT from a client, as part of cleanup, inodelk objects are not removed from the blocked_locks list before being unref'd and freed, causing the brick process to crash at some point when the (now) stale object is accessed again in the list. * Also during cleanup, it is pointless to try and grant lock to a previously blocked inodelk (say L1) as part of releasing another conflicting lock (L2), (which is a side-effect of L1 not being deleted from blocked_locks list before grant_blocked_inode_locks() in cleanup) if L1 is also associated with the DISCONNECTing client. This patch fixes the problem. * Also, the codepath in cleanup of entrylks seems to be granting blocked inodelks, when it should be attempting to grant blocked entrylks, which is fixed in this patch. Change-Id: I8493365c33020333b3f61aa15f505e4e7e6a9891 BUG: 1089470 Signed-off-by: Krutika Dhananjay Reviewed-on: http://review.gluster.org/7512 Reviewed-by: Raghavendra G Reviewed-by: Pranith Kumar Karampuri Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi Reviewed-by: Anand Avati --- xlators/features/locks/src/entrylk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/features/locks/src/entrylk.c') diff --git a/xlators/features/locks/src/entrylk.c b/xlators/features/locks/src/entrylk.c index dc86512be..4f5d8aca2 100644 --- a/xlators/features/locks/src/entrylk.c +++ b/xlators/features/locks/src/entrylk.c @@ -749,7 +749,7 @@ pl_entrylk_client_cleanup (xlator_t *this, pl_ctx_t *ctx) dom = get_domain (pinode, l->volume); - grant_blocked_inode_locks (this, pinode, dom); + grant_blocked_entry_locks (this, pinode, dom); pthread_mutex_lock (&pinode->mutex); { -- cgit