[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gluster-devel] [PATCH 2/2] features/locks: Fix insert_and_merge
From: |
Corentin Chary |
Subject: |
[Gluster-devel] [PATCH 2/2] features/locks: Fix insert_and_merge |
Date: |
Tue, 6 Oct 2009 14:06:32 +0200 |
Init the list structure, because it will be used later,
and subtract_lock does not do it.
Also remove the special handling for unlocks, which was
probably introduced as a workaround for this bug.
Signed-off-by: Corentin Chary <address@hidden>
BUG: 297 (Posix locks cannot handle a single unlock over multiple held locks)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=297
---
xlators/features/locks/src/common.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/xlators/features/locks/src/common.c
b/xlators/features/locks/src/common.c
index 1f10aa2..0887e7b 100644
--- a/xlators/features/locks/src/common.c
+++ b/xlators/features/locks/src/common.c
@@ -380,10 +380,7 @@ __insert_and_merge (pl_inode_t *pl_inode, posix_lock_t
*lock,
if (!v.locks[i])
continue;
- if (v.locks[i]->fl_type == F_UNLCK) {
- __destroy_lock (v.locks[i]);
- continue;
- }
+ INIT_LIST_HEAD(&v.locks[i]->list);
__insert_and_merge (pl_inode,
v.locks[i], dom);
}
--
1.6.3.3