linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Eric Sesterhenn <snakebyte@gmx.de>
Cc: linux-nfs@vger.kernel.org, hch@lst.de, neilb@suse.de
Subject: [PATCH] nfsd: fix double-lock of i_mutex on nfsv4 recovery directory
Date: Tue, 6 Jan 2009 12:29:14 -0500	[thread overview]
Message-ID: <20090106172914.GG2386@fieldses.org> (raw)
In-Reply-To: <20090106100246.GA13742@alice>

From: J. Bruce Fields <bfields@citi.umich.edu>

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@citi.umich.edu>
---
 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?

--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


  reply	other threads:[~2009-01-06 17:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-06 10:02 (unknown) Eric Sesterhenn
2009-01-06 17:29 ` J. Bruce Fields [this message]
2009-01-06 17:58   ` [PATCH] nfsd: fix double-lock of i_mutex on nfsv4 recovery directory J. Bruce Fields
2009-01-06 19:23     ` J. Bruce Fields
2009-01-06 19:32       ` Christoph Hellwig
2009-01-06 20:07         ` J. Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090106172914.GG2386@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=hch@lst.de \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=snakebyte@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).