vserver 1.9.3
[linux-2.6.git] / fs / nfsd / nfs3proc.c
index 941ceae..effcd19 100644 (file)
@@ -492,8 +492,16 @@ nfsd3_proc_readdirplus(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp,
                count += PAGE_SIZE;
        }
        resp->count = count >> 2;
-       if (resp->offset)
-               xdr_encode_hyper(resp->offset, offset);
+       if (resp->offset) {
+               if (unlikely(resp->offset1)) {
+                       /* we ended up with offset on a page boundary */
+                       *resp->offset = htonl(offset >> 32);
+                       *resp->offset1 = htonl(offset & 0xffffffff);
+                       resp->offset1 = NULL;
+               } else {
+                       xdr_encode_hyper(resp->offset, offset);
+               }
+       }
 
        RETURN_STATUS(nfserr);
 }