[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gluster-devel] [PATCH 2/2] features/locks: Fix insert_and_merge
From: |
Anand Avati |
Subject: |
Re: [Gluster-devel] [PATCH 2/2] features/locks: Fix insert_and_merge |
Date: |
Fri, 9 Oct 2009 16:36:31 +0530 |
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 <address@hidden> 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 <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
>
>
>
> _______________________________________________
> Gluster-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/gluster-devel
>