[pnfs] [PATCH] check that the owner is unlocking
Marc Eshel
eshel at almaden.ibm.com
Fri May 16 12:22:40 EDT 2008
"J. Bruce Fields" <bfields at fieldses.org> wrote on 05/16/2008 07:35:14 AM:
> "J. Bruce Fields" <bfields at fieldses.org>
> 05/16/2008 07:35 AM
>
> To
>
> Marc Eshel <eshel at almaden.ibm.com>
>
> cc
>
> pnfs at linux-nfs.org
>
> Subject
>
> Re: [pnfs] [PATCH] check that the owner is unlocking
>
> On Thu, May 15, 2008 at 03:26:49PM -0700, Marc Eshel wrote:
> > From: Marc Eshel <eshel at almaden.ibm.com>
> >
> >
> > ---
> >
> > fs/nfsd/nfs4state.c | 1 +
> > 1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> > index 20a4b8e..b75a863 100644
> > --- a/fs/nfsd/nfs4state.c
> > +++ b/fs/nfsd/nfs4state.c
> > @@ -134,6 +134,7 @@ nfs4_lock_state(void)
> > void
> > nfs4_unlock_state(void)
> > {
> > + BUG_ON(client_mutex_owner != current_thread_info());
> > client_mutex_owner = NULL;
> > mutex_unlock(&client_mutex);
>
> The mutex code should already check for this.
>
but by than client_mutex_owner is already NULL, so if some thread unlocks
a lock that it doesn't own it will reset the real owner to NULL which will
confuse functions like nfs4_lock_state_nested().
Marc.
> --b.
>
> > }
> > _______________________________________________
> > pNFS mailing list
> > pNFS at linux-nfs.org
> > http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://linux-nfs.org/pipermail/pnfs/attachments/20080516/c93d2c5e/attachment.htm
More information about the pNFS
mailing list