summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2011-05-30 07:55:00 +0000
committerAnand Avati <avati@gluster.com>2011-05-30 07:23:27 -0700
commitfcd35ea786dea454b11837f818be959082c8e731 (patch)
treed3e9d22c8643d7357468d60310316bcf7ff205e7 /xlators
parentf1a6ff00a1a4d5bb1124d853c60f68c55d42ad4d (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')
-rw-r--r--xlators/features/locks/src/entrylk.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/features/locks/src/entrylk.c b/xlators/features/locks/src/entrylk.c
index e58c1a2c378..9e7d4c87820 100644
--- a/xlators/features/locks/src/entrylk.c
+++ b/xlators/features/locks/src/entrylk.c
@@ -671,6 +671,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,
@@ -678,11 +679,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: