Re: [PATCH] nfs_unlink() race (was: nfs_refresh_inode: inode number mismatch)

From: Frank Cusack (fcusack@fcusack.com)
Date: Wed Jun 11 2003 - 17:24:36 EST


On Wed, Jun 11, 2003 at 08:26:52PM +0200, Trond Myklebust wrote:
> diff -u --recursive --new-file linux-2.4.21-rc6/fs/namei.c linux/fs/namei.c
> --- linux-2.4.21-rc6/fs/namei.c 2002-12-30 09:39:54.000000000 -0800
> +++ linux/fs/namei.c 2003-06-11 11:16:49.000000000 -0700
> @@ -633,7 +633,8 @@
> * Check the cached dentry for staleness.
> */
> dentry = nd->dentry;
> - if (dentry && dentry->d_op && dentry->d_op->d_revalidate) {

Doesn't the above simply always revalidate?

> + if (dentry && dentry->d_sb
> + && (dentry->d_sb->s_type->fs_flags & FS_ALWAYS_REVAL)) {
> err = -ESTALE;
> if (!dentry->d_op->d_revalidate(dentry, 0)) {
> d_invalidate(dentry);

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



This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:30 EST