Commit a5801ce9 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] SGI 921857: find broken with nohide on NFSv3

This patch makes "find" work when traversing nohide exports on NFSv3.  The
READDIRPLUS reply needs to not return a file handle for the ".." entry when
the directory is a server side mountpoint, which would be the directory
itself, otherwise the client remembers the wrong file handle and gets
confused.
Signed-off-by: default avatarGreg Banks <gnb@melbourne.sgi.com>
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 54fd44c9
......@@ -801,6 +801,11 @@ compose_entry_fh(struct nfsd3_readdirres *cd, struct svc_fh *fhp,
if (isdotent(name, namlen)) {
if (namlen == 2) {
dchild = dget_parent(dparent);
if (dchild == dparent) {
/* filesystem root - cannot return filehandle for ".." */
dput(dchild);
return 1;
}
} else
dchild = dget(dparent);
} else
......
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