Commit 9dd686fa authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[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.
parent 24526e81
...@@ -825,6 +825,8 @@ encode_entry(struct readdir_cd *ccd, const char *name, ...@@ -825,6 +825,8 @@ encode_entry(struct readdir_cd *ccd, const char *name,
dchild = lookup_one_len(name, dparent,namlen); dchild = lookup_one_len(name, dparent,namlen);
if (IS_ERR(dchild)) if (IS_ERR(dchild))
goto noexec; goto noexec;
if (d_mountpoint(dchild))
goto noexec;
if (fh_compose(&fh, exp, dchild, &cd->fh) != 0 || !dchild->d_inode) if (fh_compose(&fh, exp, dchild, &cd->fh) != 0 || !dchild->d_inode)
goto noexec; goto noexec;
p = encode_post_op_attr(cd->rqstp, p, &fh); p = encode_post_op_attr(cd->rqstp, p, &fh);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment