diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2011-05-31 00:54:41 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-05-31 09:11:21 -0700 |
commit | 5c81c9dce46b454323e2b3241b7fe2d58f805dc0 (patch) | |
tree | 22a720b776a3654aa0681bf738e89844fc399d6d /xlators/features | |
parent | 3562a2eea2c37889d51e93bd8b632c373990b344 (diff) |
features/locks: Unwind with SUCCESS on non-blocking entrylk success
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2949 (self-heal hangs)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2949
Diffstat (limited to 'xlators/features')
-rw-r--r-- | xlators/features/locks/src/entrylk.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/features/locks/src/entrylk.c b/xlators/features/locks/src/entrylk.c index 827b87d20d1..bca2556f5ac 100644 --- a/xlators/features/locks/src/entrylk.c +++ b/xlators/features/locks/src/entrylk.c @@ -675,6 +675,7 @@ pl_common_entrylk (call_frame_t *frame, xlator_t *this, break; case ENTRYLK_LOCK_NB: + unwind = 1; pthread_mutex_lock (&pinode->mutex); { ret = __lock_name (pinode, basename, type, @@ -682,11 +683,11 @@ pl_common_entrylk (call_frame_t *frame, xlator_t *this, } pthread_mutex_unlock (&pinode->mutex); - if (ret < 0) + if (ret < 0) { op_errno = -ret; + goto out; + } - unwind = 1; - goto out; break; case ENTRYLK_UNLOCK: |