From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: akpm@osdl.org, viro@ftp.linux.org.uk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nfs: don't drop dentry in d_revalidate
Date: Fri, 07 Oct 2005 09:52:55 -0400 [thread overview]
Message-ID: <1128693175.8519.84.camel@lade.trondhjem.org> (raw)
In-Reply-To: <E1ENqHd-0004cW-00@dorka.pomaz.szeredi.hu>
fr den 07.10.2005 Klokka 13:21 (+0200) skreiv Miklos Szeredi:
> NFS d_revalidate() is doing things that are supposed to be done by
> d_invalidate().
>
> Dropping the dentry is especially bad, since it will make
> d_invalidate() bypass all checks.
NAK!
Bypassing the stupid d_invalidate checks is precisely the point here.
Unlike local filesystems, we have to deal with the case where someone
deletes a file on the server and then creates a new one with the same
name. The d_invalidate checks will keep the wrong dentry hashed for as
long as some borken process has the file open.
Trond
> Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
> ---
>
> Index: linux/fs/nfs/dir.c
> ===================================================================
> --- linux.orig/fs/nfs/dir.c 2005-10-04 13:59:57.000000000 +0200
> +++ linux/fs/nfs/dir.c 2005-10-07 12:53:45.000000000 +0200
> @@ -762,12 +762,7 @@ 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;
> - shrink_dcache_parent(dentry);
> }
> - d_drop(dentry);
> unlock_kernel();
> dput(parent);
> return 0;
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2005-10-07 13:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-07 11:21 Miklos Szeredi
2005-10-07 13:52 ` Trond Myklebust [this message]
2005-10-07 14:04 ` Miklos Szeredi
2005-10-07 14:38 ` Al Viro
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=1128693175.8519.84.camel@lade.trondhjem.org \
--to=trond.myklebust@fys.uio.no \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=viro@ftp.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®