From 64e7f70a0b3d6c8c57dd9d15f745451639dc8c76 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Thu, 7 Jul 2011 03:00:29 +0000 Subject: features/locks: Do not block UNLOCKs Signed-off-by: Vijay Bellur Signed-off-by: Anand Avati BUG: 2473 (Support for volume and directory level quota) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2473 --- xlators/features/locks/src/inodelk.c | 2 +- xlators/features/locks/src/posix.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xlators/features/locks/src/inodelk.c b/xlators/features/locks/src/inodelk.c index f3c158ebb..81cd26730 100644 --- a/xlators/features/locks/src/inodelk.c +++ b/xlators/features/locks/src/inodelk.c @@ -615,7 +615,7 @@ pl_common_inodelk (call_frame_t *frame, xlator_t *this, can_block, dom); if (ret < 0) { - if (can_block) { + if ((can_block) && (F_UNLCK != reqlock->fl_type)) { pl_trace_block (this, frame, fd, loc, cmd, flock, volume); goto out; diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c index c0f8b5dfe..f8f264899 100644 --- a/xlators/features/locks/src/posix.c +++ b/xlators/features/locks/src/posix.c @@ -1102,7 +1102,7 @@ pl_lk (call_frame_t *frame, xlator_t *this, can_block); if (ret == -1) { - if (can_block) { + if ((can_block) && (F_UNLCK != reqlock->fl_type)) { pl_trace_block (this, frame, fd, NULL, cmd, flock, NULL); goto out; } -- cgit