[Gluster-devel] [PATCH 2/2] features/locks: Fix insert_and_merge
Anand Avati
avati at gluster.com
Fri Oct 9 11:06:31 UTC 2009
Corentin,
This is a good catch! Thank you for the patch. It will be included
in our next RC release. I will be reformatting this patch slightly
however. The BUG: and URL: lines will be automatically added in our
commit scripts if you just generate the patch from ./format-patch.sh,
but we'll do the reformatting.
Thanks once again!
Avati
On Tue, Oct 6, 2009 at 5:36 PM, Corentin Chary <corentin.chary at gmail.com> wrote:
> 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 at gmail.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
> ---
> 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
>
>
>
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel at nongnu.org
> http://lists.nongnu.org/mailman/listinfo/gluster-devel
>
More information about the Gluster-devel
mailing list