From 9dd686fa1f42b0fd3e85410fa12dfe7ec9f07c73 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Mon, 20 Oct 2003 02:55:41 -0700 Subject: [PATCH] [PATCH] kNFSd - In READDIRPLUS reply, don't return a file handle for a mounted directory. ... as if "nohide" is in used, it will be the wrong filehandle, and returning a filehandle is optional anyway. --- fs/nfsd/nfs3xdr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c index 5e381137f48c3..0e927618d1fde 100644 --- a/fs/nfsd/nfs3xdr.c +++ b/fs/nfsd/nfs3xdr.c @@ -825,6 +825,8 @@ encode_entry(struct readdir_cd *ccd, const char *name, dchild = lookup_one_len(name, dparent,namlen); if (IS_ERR(dchild)) goto noexec; + if (d_mountpoint(dchild)) + goto noexec; if (fh_compose(&fh, exp, dchild, &cd->fh) != 0 || !dchild->d_inode) goto noexec; p = encode_post_op_attr(cd->rqstp, p, &fh); -- 2.53.0