From: Jeff Layton <jlayton@redhat.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: rwheeler@redhat.com, avati@redhat.com, viro@ZenIV.linux.org.uk,
bfoster@redhat.com, dhowells@redhat.com, eparis@redhat.com,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
mszeredi@suse.cz, Trond Myklebust <Trond.Myklebust@netapp.com>
Subject: Re: [PATCH 5/9] nfs: use check_submounts_and_drop()
Date: Mon, 12 Aug 2013 09:34:50 -0400 [thread overview]
Message-ID: <20130812093450.678d9fd5@tlielax.poochiereds.net> (raw)
In-Reply-To: <1375975490-18673-6-git-send-email-miklos@szeredi.hu>
On Thu, 8 Aug 2013 17:24:46 +0200
Miklos Szeredi <miklos@szeredi.hu> wrote:
> From: Miklos Szeredi <mszeredi@suse.cz>
>
> Do have_submounts(), shrink_dcache_parent() and d_drop() atomically.
>
> check_submounts_and_drop() can deal with negative dentries and
> non-directories as well.
>
> Non-directories can also be mounted on. And just like directories we don't
> want these to disappear with invalidation.
>
> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
> CC: Trond Myklebust <Trond.Myklebust@netapp.com>
> ---
> fs/nfs/dir.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
> index e474ca2b..7468735 100644
> --- a/fs/nfs/dir.c
> +++ b/fs/nfs/dir.c
> @@ -1135,14 +1135,13 @@ out_zap_parent:
> if (inode && S_ISDIR(inode->i_mode)) {
> /* Purge readdir caches. */
> nfs_zap_caches(inode);
> - /* If we have submounts, don't unhash ! */
> - if (have_submounts(dentry))
> - goto out_valid;
> if (dentry->d_flags & DCACHE_DISCONNECTED)
> goto out_valid;
> - shrink_dcache_parent(dentry);
> }
> - d_drop(dentry);
> + /* If we have submounts, don't unhash ! */
> + if (check_submounts_and_drop(dentry) != 0)
> + goto out_valid;
> +
> dput(parent);
> dfprintk(LOOKUPCACHE, "NFS: %s(%s/%s) is invalid\n",
> __func__, dentry->d_parent->d_name.name,
Acked-by: Jeff Layton <jlayton@redhat.com>
next prev parent reply other threads:[~2013-08-12 13:35 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-08 15:24 [PATCH 0/9] [RFC v2] safely drop directory dentry on failed revalidate Miklos Szeredi
2013-08-08 15:24 ` [PATCH 1/9] vfs: check submounts and drop atomically Miklos Szeredi
2013-08-12 13:27 ` Jeff Layton
2013-08-08 15:24 ` [PATCH 2/9] vfs: check unlinked ancestors before mount Miklos Szeredi
2013-08-12 13:33 ` Jeff Layton
2013-08-08 15:24 ` [PATCH 3/9] afs: use check_submounts_and_drop() Miklos Szeredi
2013-08-08 15:24 ` [PATCH 4/9] gfs2: " Miklos Szeredi
2013-08-08 15:24 ` [PATCH 5/9] nfs: " Miklos Szeredi
2013-08-12 13:34 ` Jeff Layton [this message]
2013-08-08 15:24 ` [PATCH 6/9] sysfs: " Miklos Szeredi
2013-08-08 15:24 ` [PATCH 7/9] fuse: use d_materialise_unique() Miklos Szeredi
2013-08-08 15:24 ` [PATCH 8/9] fuse: clean up return in fuse_dentry_revalidate() Miklos Szeredi
2013-08-08 15:24 ` [PATCH 9/9] fuse: drop dentry on failed revalidate Miklos Szeredi
2013-08-21 5:40 ` [PATCH 0/9] [RFC v2] safely drop directory " Al Viro
2013-08-21 20:04 ` Ryusuke Konishi
2013-08-21 21:00 ` Al Viro
2013-08-21 23:47 ` Ryusuke Konishi
2013-08-29 3:51 ` Miklos Szeredi
2013-08-29 23:24 ` Ian Kent
2013-08-29 23:44 ` Ian Kent
2013-08-30 8:59 ` Miklos Szeredi
2013-09-01 0:56 ` Ian Kent
2013-09-01 1:00 ` Ian Kent
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=20130812093450.678d9fd5@tlielax.poochiereds.net \
--to=jlayton@redhat.com \
--cc=Trond.Myklebust@netapp.com \
--cc=avati@redhat.com \
--cc=bfoster@redhat.com \
--cc=dhowells@redhat.com \
--cc=eparis@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mszeredi@suse.cz \
--cc=rwheeler@redhat.com \
--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
all inboxes | Powered by JetHome®