Re: [PATCH] nfsd: fix double-lock of i_mutex on nfsv4 recovery directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 06, 2009 at 12:29:14PM -0500, bfields wrote:
> From: J. Bruce Fields <bfields@xxxxxxxxxxxxxx>
> 
> This mutex should be unnecessary, and as of 4c728ef583b3d "add a
> vfs_fsync helper" it triggers a lockdep warning.
> 
> Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxxxxxx>
> ---
>  fs/nfsd/nfs4recover.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> On Tue, Jan 06, 2009 at 11:02:47AM +0100, Eric Sesterhenn wrote:
> > hi,
> > 
> > with todays -git i see the following lockdep warning, that wasnt there
> > yesterday. It occurs after booting the box.
> 
> Thanks.  The much-hated recovery code strikes again.  I think this
> should do it?

No, then we just run into a deadlocks in unlink, create, or any of the
other nfsd operations that want the parent lock to cover more than just
the sync.  So 4c728ef583b3d just doesn't work for nfsd.

--b.

> 
> --b.
> 
> diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
> index 74f7b67..9fb5a10 100644
> --- a/fs/nfsd/nfs4recover.c
> +++ b/fs/nfsd/nfs4recover.c
> @@ -127,9 +127,7 @@ out_no_tfm:
>  static void
>  nfsd4_sync_rec_dir(void)
>  {
> -	mutex_lock(&rec_dir.dentry->d_inode->i_mutex);
>  	nfsd_sync_dir(rec_dir.dentry);
> -	mutex_unlock(&rec_dir.dentry->d_inode->i_mutex);
>  }
>  
>  int
> -- 
> 1.5.5.rc1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux