summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/afr/src/afr-transaction.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c
index 3a542ceca43..dae4c8234e9 100644
--- a/xlators/cluster/afr/src/afr-transaction.c
+++ b/xlators/cluster/afr/src/afr-transaction.c
@@ -2286,9 +2286,6 @@ __need_previous_lock_unlocked(afr_local_t *local)
{
afr_lock_t *lock = NULL;
- if (!local->transaction.eager_lock_on)
- return _gf_true;
-
lock = &local->inode_ctx->lock[local->transaction.type];
if (!lock->acquired)
return _gf_false;
@@ -2305,10 +2302,8 @@ __afr_eager_lock_handle(afr_local_t *local, gf_boolean_t *take_lock,
afr_local_t *owner_local = NULL;
xlator_t *this = local->transaction.frame->this;
- if (local->fd && !afr_are_multiple_fds_opened(local, this)) {
- local->transaction.eager_lock_on = _gf_true;
- afr_set_lk_owner(local->transaction.frame, this, local->inode);
- }
+ local->transaction.eager_lock_on = _gf_true;
+ afr_set_lk_owner(local->transaction.frame, this, local->inode);
lock = &local->inode_ctx->lock[local->transaction.type];
if (__need_previous_lock_unlocked(local)) {
@@ -2325,8 +2320,6 @@ __afr_eager_lock_handle(afr_local_t *local, gf_boolean_t *take_lock,
lock->delay_timer = NULL;
}
}
- if (!local->transaction.eager_lock_on)
- goto out;
}
if (lock->release) {