X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fnfsd%2Fnfs3proc.c;h=effcd19130908c8e9ca2fd42df4b96e79a2cc618;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=941ceaec1a1d5dcda6b95ea7739a372f55fed452;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c index 941ceaec1..effcd1913 100644 --- a/fs/nfsd/nfs3proc.c +++ b/fs/nfsd/nfs3proc.c @@ -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); }