features/locks: Fix insert_and_merge

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 <corentin.chary@gmail.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

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
This commit is contained in:
Corentin Chary 2009-10-09 06:25:11 +00:00 committed by Anand V. Avati
parent 58bc556b84
commit 2231e5f8ab

View File

@ -426,10 +426,6 @@ __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;
}
__insert_and_merge (pl_inode,
v.locks[i]);
}