vserver 2.0 rc7
[linux-2.6.git] / fs / nfsd / nfs3xdr.c
index 4580bce..f307000 100644 (file)
@@ -809,6 +809,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