From: Christoph Hellwig <hch@infradead.org>
To: Sage Weil <sage@newdream.net>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org, viro@zeniv.linux.org.uk,
adilger@sun.com
Subject: Re: [PATCH] vfs: make real_lookup do dentry revalidation with i_mutex held
Date: Tue, 17 Mar 2009 04:17:30 -0400 [thread overview]
Message-ID: <20090317081730.GA20213@infradead.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0903091118210.2773@cobra.newdream.net>
Keeping i_mutes over do_revalidate seem fine from a first glance, but
can you please do it without rearranging the whole code?
Something like the tiny untested patch below should archive the same
thing:
Index: linux-2.6/fs/namei.c
===================================================================
--- linux-2.6.orig/fs/namei.c 2009-03-17 09:15:53.430978739 +0100
+++ linux-2.6/fs/namei.c 2009-03-17 09:16:19.553981306 +0100
@@ -512,12 +512,12 @@ out_unlock:
* Uhhuh! Nasty case: the cache was re-populated while
* we waited on the semaphore. Need to revalidate.
*/
- mutex_unlock(&dir->i_mutex);
if (result->d_op && result->d_op->d_revalidate) {
result = do_revalidate(result, nd);
if (!result)
result = ERR_PTR(-ENOENT);
}
+ mutex_unlock(&dir->i_mutex);
return result;
}
next prev parent reply other threads:[~2009-03-17 8:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-09 18:31 [PATCH] vfs: make real_lookup do dentry revalidation with i_mutex held Sage Weil
2009-03-10 19:22 ` Miklos Szeredi
2009-03-10 19:31 ` Sage Weil
2009-03-17 8:17 ` Christoph Hellwig [this message]
2009-03-17 17:03 ` Sage Weil
2009-03-19 19:32 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2009-09-24 16:10 Sage Weil
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=20090317081730.GA20213@infradead.org \
--to=hch@infradead.org \
--cc=adilger@sun.com \
--cc=akpm@linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sage@newdream.net \
--cc=viro@zeniv.linux.org.uk \
/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).