Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 216d5d06 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFSv4: Use NFSv2/v3 rules for negative dentries in nfs_open_revalidate

parent 0a5ebc14
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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;