diff options
| author | Anand Avati <avati@redhat.com> | 2014-03-08 12:50:47 -0800 | 
|---|---|---|
| committer | Vijay Bellur <vbellur@redhat.com> | 2014-04-04 06:38:13 -0700 | 
| commit | 18ad6f2dc7b8254ef718de6311f7344b28e99797 (patch) | |
| tree | 5b9915cd51311ddfd89848b245c51397ff345019 | |
| parent | 92d3d8b8cb8fc5886d71fe184339fdcbeb5439db (diff) | |
locks: fix unconditional op_ret success of entrylk
Bug introduced in recent refactoring. op_ret of entrylk() was always
getting set to 0 even though second locker wouldn't have gotten a lock.
This was resulting in multiple contenders to get locks granted at the
same time.
BUG: 849630
Change-Id: I130d521407afee15de59f270b59687d41982fb29
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/7232
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
| -rw-r--r-- | xlators/features/locks/src/entrylk.c | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/features/locks/src/entrylk.c b/xlators/features/locks/src/entrylk.c index c176306fe4f..ea69956271f 100644 --- a/xlators/features/locks/src/entrylk.c +++ b/xlators/features/locks/src/entrylk.c @@ -607,6 +607,9 @@ pl_common_entrylk (call_frame_t *frame, xlator_t *this,  			if (unlocked) {  				list_del_init (&unlocked->client_list);  				__pl_entrylk_unref (unlocked); +				op_ret = 0; +			} else { +				op_errno = EINVAL;  			}  			__pl_entrylk_unref (reqlock);                  } @@ -624,8 +627,6 @@ pl_common_entrylk (call_frame_t *frame, xlator_t *this,                          "a bug report at http://bugs.gluster.com", cmd);                  goto out;          } - -        op_ret = 0;  out:          pl_update_refkeeper (this, inode);  | 
