From: NeilBrown 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 Signed-off-by: Neil Brown Signed-off-by: Andrew Morton --- 25-akpm/fs/nfsd/nfs3xdr.c | 5 +++++ 1 files changed, 5 insertions(+) diff -puN fs/nfsd/nfs3xdr.c~nfsd--sgi-921857-find-broken-with-nohide-on-nfsv3 fs/nfsd/nfs3xdr.c --- 25/fs/nfsd/nfs3xdr.c~nfsd--sgi-921857-find-broken-with-nohide-on-nfsv3 2005-02-07 19:19:03.000000000 -0800 +++ 25-akpm/fs/nfsd/nfs3xdr.c 2005-02-07 19:19:03.000000000 -0800 @@ -801,6 +801,11 @@ compose_entry_fh(struct nfsd3_readdirres 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 _