Skip to content

Commit

Permalink
Have nfs ->d_revalidate() report errors properly
Browse files Browse the repository at this point in the history
	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: Daniel J Blueman <daniel.blueman@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Al Viro authored and Linus Torvalds committed Apr 7, 2010
1 parent 48de8cb commit 04287f9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2068,8 +2068,7 @@ nfs4_open_revalidate(struct inode *dir, struct dentry *dentry, int openflags, st
case -EDQUOT:
case -ENOSPC:
case -EROFS:
lookup_instantiate_filp(nd, (struct dentry *)state, NULL);
return 1;
return PTR_ERR(state);
default:
goto out_drop;
}
Expand Down

0 comments on commit 04287f9

Please sign in to comment.