[PATCH 1/2] knfsd: Fixed problem with NFS exporting directories which are mounted on.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linus Torvalds <torvalds@...>
Cc: <nfs@...>, <linux-kernel@...>, Neil Brown <neilb@...>, J. Bruce Fields <bfields@...>
Date: Wednesday, September 5, 2007 - 5:22 pm

From: Neil Brown <neilb@suse.de>

Recent changes in NFSd cause a directory which is mounted-on
to not appear properly when the filesystem containing it is exported.

*exp_get* not returns -ENOENT rather than NULL and when
  commit 5d3dbbeaf56d0365ac6b5c0a0da0bd31cc4781e1
removed the NULL checks, it didn't add a check for -ENOENT.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
---
 fs/nfsd/vfs.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index a0c2b25..7867151 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -115,7 +115,8 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp,
 
 	exp2 = rqst_exp_get_by_name(rqstp, mnt, mounts);
 	if (IS_ERR(exp2)) {
-		err = PTR_ERR(exp2);
+		if (PTR_ERR(exp2) != -ENOENT)
+			err = PTR_ERR(exp2);
 		dput(mounts);
 		mntput(mnt);
 		goto out;
-- 
1.5.3

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
nfsd patches for 2.6.23, J. Bruce Fields, (Wed Sep 5, 5:22 pm)
[PATCH 1/2] knfsd: Fixed problem with NFS exporting director..., J. Bruce Fields, (Wed Sep 5, 5:22 pm)
[PATCH 2/2] knfsd: Validate filehandle type in fsid_source, J. Bruce Fields, (Wed Sep 5, 5:22 pm)