summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-lk-common.c
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2012-05-20 21:02:55 +0530
committerAnand Avati <avati@redhat.com>2012-05-22 00:30:27 -0700
commitbb2fc0a23e46413a14baef1846a9873681d32fe2 (patch)
tree9ab221974d358821d29ac61180cfba9da07b841d /xlators/cluster/afr/src/afr-lk-common.c
parent93893b9ac06479bdfe28f94fce961594b928121a (diff)
cluster/afr: Unlock higher entry locks in rename entrylk failure.
BUG: 823255 Change-Id: Ic6ad33518ea42c9518a21381518bd4f4afdd87cb Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3382 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-lk-common.c')
-rw-r--r--xlators/cluster/afr/src/afr-lk-common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-lk-common.c b/xlators/cluster/afr/src/afr-lk-common.c
index 7e897a166..92356c82e 100644
--- a/xlators/cluster/afr/src/afr-lk-common.c
+++ b/xlators/cluster/afr/src/afr-lk-common.c
@@ -57,6 +57,9 @@
int
afr_lock_blocking (call_frame_t *frame, xlator_t *this, int child_index);
+static int
+afr_copy_locked_nodes (call_frame_t *frame, xlator_t *this);
+
static uint64_t afr_lock_number = 1;
static uint64_t
@@ -860,6 +863,7 @@ afr_lock_lower_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
UNLOCK (&frame->lock);
if (op_ret != 0) {
+ afr_copy_locked_nodes (frame, this);
afr_unlock (frame, this);
goto out;
} else {