G'day,
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: Greg Banks <[email protected]>
Index: linux/fs/nfsd/nfs3xdr.c
===================================================================
--- linux.orig/fs/nfsd/nfs3xdr.c 2004-09-22 17:20:41.%N +1000
+++ linux/fs/nfsd/nfs3xdr.c 2004-09-22 19:45:27.%N +1000
@@ -817,6 +817,10 @@ compose_entry_fh(struct nfsd3_readdirres
if (isdotent(name, namlen)) {
if (namlen == 2) {
dchild = dget_parent(dparent);
+ if (dchild == dparent) {
+ dput(dchild);
+ return 1;
+ }
} else
dchild = dget(dparent);
} else
Greg.
--
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs