knfsd: Fixed problem with NFS exporting directories which are mounted on.

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>

authored by Neil Brown and committed by Linus Torvalds a1033be7 7d941432

+2 -1
+2 -1
fs/nfsd/vfs.c
··· 115 116 exp2 = rqst_exp_get_by_name(rqstp, mnt, mounts); 117 if (IS_ERR(exp2)) { 118 - err = PTR_ERR(exp2); 119 dput(mounts); 120 mntput(mnt); 121 goto out;
··· 115 116 exp2 = rqst_exp_get_by_name(rqstp, mnt, mounts); 117 if (IS_ERR(exp2)) { 118 + if (PTR_ERR(exp2) != -ENOENT) 119 + err = PTR_ERR(exp2); 120 dput(mounts); 121 mntput(mnt); 122 goto out;