From: Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
To: "J. Bruce Fields" <bfields-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Al Viro <viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org>,
linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Nick Piggin <npiggin-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>
Subject: Re: [PATCH 1/3] dcache: use IS_ROOT to decide where dentry is hashed
Date: Fri, 6 Sep 2013 10:00:44 -0700 [thread overview]
Message-ID: <20130906170044.GA6460@infradead.org> (raw)
In-Reply-To: <1378482230-16312-1-git-send-email-bfields-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
On Fri, Sep 06, 2013 at 11:43:48AM -0400, J. Bruce Fields wrote:
> diff --git a/fs/dcache.c b/fs/dcache.c
> index b949af8..934f02d 100644
> --- a/fs/dcache.c
> +++ b/fs/dcache.c
> @@ -393,7 +393,7 @@ static void __d_shrink(struct dentry *dentry)
> {
> if (!d_unhashed(dentry)) {
> struct hlist_bl_head *b;
> - if (unlikely(dentry->d_flags & DCACHE_DISCONNECTED))
> + if (unlikely(IS_ROOT(dentry)))
I think this needs a comment about why the IS_ROOT check is fine,
destilled from your commit log.
Also while reviewing this I noticed that one of the two callers of
__d_shrink already has the d_unhashed check - it might make sense to
move it to the other caller as well if you touch this area anyway.
(as a separate patch).
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-09-06 17:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-06 15:43 [PATCH 1/3] dcache: use IS_ROOT to decide where dentry is hashed J. Bruce Fields
2013-09-06 15:43 ` [PATCH 2/3] dcache: Don't set DISCONNECTED on "pseudo filesystem" dentries J. Bruce Fields
2013-09-06 17:03 ` Christoph Hellwig
[not found] ` <20130906170339.GB6460-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2013-09-06 19:29 ` J. Bruce Fields
2013-09-06 15:43 ` [PATCH 3/3] dcache: don't clear DCACHE_DISCONNECTED too early J. Bruce Fields
[not found] ` <1378482230-16312-1-git-send-email-bfields-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-09-06 17:00 ` Christoph Hellwig [this message]
[not found] ` <20130906170044.GA6460-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2013-09-06 19:03 ` [PATCH 1/3] dcache: use IS_ROOT to decide where dentry is hashed 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=20130906170044.GA6460@infradead.org \
--to=hch-wegcikhe2lqwvfeawa7xhq@public.gmane.org \
--cc=bfields-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=npiggin-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org \
--cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org \
/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).