summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/leases/src/leases-internal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/features/leases/src/leases-internal.c b/xlators/features/leases/src/leases-internal.c
index 8ed0abcae82..a52bf577b75 100644
--- a/xlators/features/leases/src/leases-internal.c
+++ b/xlators/features/leases/src/leases-internal.c
@@ -747,7 +747,9 @@ __is_lease_grantable (xlator_t *this, lease_inode_ctx_t *lease_ctx,
}
/* check for conflict with existing leases */
- if (lease_ctx->lease_type == NONE || lease_ctx->lease_type == GF_RD_LEASE)
+ if (lease_ctx->lease_type == NONE ||
+ lease_ctx->lease_type == GF_RD_LEASE ||
+ !(__another_lease_found (lease_ctx, lease->lease_id)))
grant = _gf_true;
else
grant = _gf_false;