aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/vfs.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 04bdba12d21b..7e2fdd50113f 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -99,8 +99,16 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp,
99 99
100 exp2 = rqst_exp_get_by_name(rqstp, &path); 100 exp2 = rqst_exp_get_by_name(rqstp, &path);
101 if (IS_ERR(exp2)) { 101 if (IS_ERR(exp2)) {
102 if (PTR_ERR(exp2) != -ENOENT) 102 err = PTR_ERR(exp2);
103 err = PTR_ERR(exp2); 103 /*
104 * We normally allow NFS clients to continue
105 * "underneath" a mountpoint that is not exported.
106 * The exception is V4ROOT, where no traversal is ever
107 * allowed without an explicit export of the new
108 * directory.
109 */
110 if (err == -ENOENT && !(exp->ex_flags & NFSEXP_V4ROOT))
111 err = 0;
104 path_put(&path); 112 path_put(&path);
105 goto out; 113 goto out;
106 } 114 }