From: Trond Myklebust Date: Tue, 2 Oct 2007 00:10:12 +0000 (-0400) Subject: NFSv4: Use NFSv2/v3 rules for negative dentries in nfs_open_revalidate X-Git-Tag: v2.6.24-rc1~1285^2~21 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=216d5d06883edfaf992ada0d72a2a22fdfdbd296;p=linux-2.6 NFSv4: Use NFSv2/v3 rules for negative dentries in nfs_open_revalidate Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 9ca38ab0e0..41b063c988 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1037,8 +1037,12 @@ static int nfs_open_revalidate(struct dentry *dentry, struct nameidata *nd) /* We can't create new files in nfs_open_revalidate(), so we * optimize away revalidation of negative dentries. */ - if (inode == NULL) + if (inode == NULL) { + if (!nfs_neg_need_reval(dir, dentry, nd)) + ret = 1; goto out; + } + /* NFS only supports OPEN on regular files */ if (!S_ISREG(inode->i_mode)) goto no_open;