knfsd: Fixed problem with NFS exporting directories which are mounted on.
authorNeil Brown <neilb@suse.de>
Wed, 5 Sep 2007 21:22:12 +0000 (17:22 -0400)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 11 Sep 2007 01:57:47 +0000 (18:57 -0700)
Recent changes in NFSd cause a directory which is mounted-on
to not appear properly when the filesystem containing it is exported.

*exp_get* now 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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/nfsd/vfs.c

index a0c2b253818b89e8a7f8bb1dbfafd1c5988d436b..7867151ebb83b16c6c3bcd446acfead317ec282e 100644 (file)
@@ -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;