Skip to content

Commit

Permalink
NFSv4: Use NFSv2/v3 rules for negative dentries in nfs_open_revalidate
Browse files Browse the repository at this point in the history
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Oct 9, 2007
1 parent 0a5ebc1 commit 216d5d0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 216d5d0

Please sign in to comment.