Commit 04287f97 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

Have nfs ->d_revalidate() report errors properly

	If nfs atomic open implementation ends up doing open request from
->d_revalidate() codepath and gets an error from server, return that error
to caller explicitly and don't bother with lookup_instantiate_filp() at all.
->d_revalidate() can return an error itself just fine...

See
	http://bugzilla.kernel.org/show_bug.cgi?id=15674
	http://marc.info/?l=linux-kernel&m=126988782722711&w=2

for original report.
Reported-by: default avatarDaniel J Blueman <daniel.blueman@gmail.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 48de8cb7
...@@ -2068,8 +2068,7 @@ nfs4_open_revalidate(struct inode *dir, struct dentry *dentry, int openflags, st ...@@ -2068,8 +2068,7 @@ nfs4_open_revalidate(struct inode *dir, struct dentry *dentry, int openflags, st
case -EDQUOT: case -EDQUOT:
case -ENOSPC: case -ENOSPC:
case -EROFS: case -EROFS:
lookup_instantiate_filp(nd, (struct dentry *)state, NULL); return PTR_ERR(state);
return 1;
default: default:
goto out_drop; goto out_drop;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment