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

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

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
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
		}