Skip to contentSkip to conversation

SGI 921857: find broken with nohide on NFSv3

PATCH New Greg Banks 1 participant 1 message Sep 23, 2004

Subsystems (2)
lore
Share & tools
lore

Greg Banks

author
#0 lore raw

PATCH 1/1 SGI 921857: find broken with nohide on NFSv3

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.

fs/nfsd/nfs3xdr.c +4 -0
Index: linux/fs/nfsd/nfs3xdr.c
===================================================================
@@ -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.

Signature · 12 lines
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