summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks/src/entrylk.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/locks/src/entrylk.c')
-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: