From 6c6c7eba87190bfe3c721faaa190949ff611405b Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Sun, 19 Jan 2014 19:44:06 -0800 Subject: locks: set @lock->frame = NULL when lock is granted This way disconnect cleanup code can differentiate which locks are granted vs blocked. Change-Id: I2a835c6865b6c804231d852953ea84eeccef35a3 BUG: 849630 Signed-off-by: Anand Avati Reviewed-on: http://review.gluster.org/6730 Tested-by: Gluster Build System Reviewed-by: Raghavendra Bhat Reviewed-by: Krishnan Parthasarathi --- xlators/features/locks/src/entrylk.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (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 208bc140e7a..c176306fe4f 100644 --- a/xlators/features/locks/src/entrylk.c +++ b/xlators/features/locks/src/entrylk.c @@ -371,7 +371,6 @@ __lock_entrylk (xlator_t *this, pl_inode_t *pinode, pl_entry_lock_t *lock, __pl_entrylk_ref (lock); gettimeofday (&lock->granted_time, NULL); list_add (&lock->domain_list, &dom->entrylk_list); - lock->frame = NULL; ret = 0; out: @@ -576,10 +575,12 @@ pl_common_entrylk (call_frame_t *frame, xlator_t *this, reqlock->pinode = pinode; ret = __lock_entrylk (this, pinode, reqlock, nonblock, dom); - if (ret == 0) + if (ret == 0) { + reqlock->frame = NULL; op_ret = 0; - else + } else { op_errno = -ret; + } if (ctx && (!ret || !nonblock)) list_add (&reqlock->client_list, -- cgit