aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@ZenIV.linux.org.uk>2010-04-07 19:06:07 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-04-07 19:10:16 -0400
commit04287f975e68038051eb9c79896866d36610b8e0 (patch)
treee87af9a47942a187a06b63aa3600511f4bc11ad8
parent48de8cb7847d040c8892701c1ff3c55eff1f46b4 (diff)
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: 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>
-rw-r--r--fs/nfs/nfs4proc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index d79a7b37e56c..fe0cd9eb1d4d 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2068,8 +2068,7 @@ nfs4_open_revalidate(struct inode *dir, struct dentry *dentry, int openflags, st
2068 case -EDQUOT: 2068 case -EDQUOT:
2069 case -ENOSPC: 2069 case -ENOSPC:
2070 case -EROFS: 2070 case -EROFS:
2071 lookup_instantiate_filp(nd, (struct dentry *)state, NULL); 2071 return PTR_ERR(state);
2072 return 1;
2073 default: 2072 default:
2074 goto out_drop; 2073 goto out_drop;
2075 } 2074 }