diff options
Diffstat (limited to 'fs/nfsd/nfsxdr.c')
-rw-r--r-- | fs/nfsd/nfsxdr.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/nfsd/nfsxdr.c b/fs/nfsd/nfsxdr.c index 65ec595e2226..979b42106979 100644 --- a/fs/nfsd/nfsxdr.c +++ b/fs/nfsd/nfsxdr.c | |||
@@ -246,7 +246,7 @@ nfssvc_decode_readargs(struct svc_rqst *rqstp, __be32 *p, | |||
246 | struct nfsd_readargs *args) | 246 | struct nfsd_readargs *args) |
247 | { | 247 | { |
248 | unsigned int len; | 248 | unsigned int len; |
249 | int v,pn; | 249 | int v; |
250 | if (!(p = decode_fh(p, &args->fh))) | 250 | if (!(p = decode_fh(p, &args->fh))) |
251 | return 0; | 251 | return 0; |
252 | 252 | ||
@@ -262,8 +262,9 @@ nfssvc_decode_readargs(struct svc_rqst *rqstp, __be32 *p, | |||
262 | */ | 262 | */ |
263 | v=0; | 263 | v=0; |
264 | while (len > 0) { | 264 | while (len > 0) { |
265 | pn = rqstp->rq_resused++; | 265 | struct page *p = *(rqstp->rq_next_page++); |
266 | rqstp->rq_vec[v].iov_base = page_address(rqstp->rq_respages[pn]); | 266 | |
267 | rqstp->rq_vec[v].iov_base = page_address(p); | ||
267 | rqstp->rq_vec[v].iov_len = len < PAGE_SIZE?len:PAGE_SIZE; | 268 | rqstp->rq_vec[v].iov_len = len < PAGE_SIZE?len:PAGE_SIZE; |
268 | len -= rqstp->rq_vec[v].iov_len; | 269 | len -= rqstp->rq_vec[v].iov_len; |
269 | v++; | 270 | v++; |
@@ -355,7 +356,7 @@ nfssvc_decode_readlinkargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd_readli | |||
355 | { | 356 | { |
356 | if (!(p = decode_fh(p, &args->fh))) | 357 | if (!(p = decode_fh(p, &args->fh))) |
357 | return 0; | 358 | return 0; |
358 | args->buffer = page_address(rqstp->rq_respages[rqstp->rq_resused++]); | 359 | args->buffer = page_address(*(rqstp->rq_next_page++)); |
359 | 360 | ||
360 | return xdr_argsize_check(rqstp, p); | 361 | return xdr_argsize_check(rqstp, p); |
361 | } | 362 | } |
@@ -396,7 +397,7 @@ nfssvc_decode_readdirargs(struct svc_rqst *rqstp, __be32 *p, | |||
396 | if (args->count > PAGE_SIZE) | 397 | if (args->count > PAGE_SIZE) |
397 | args->count = PAGE_SIZE; | 398 | args->count = PAGE_SIZE; |
398 | 399 | ||
399 | args->buffer = page_address(rqstp->rq_respages[rqstp->rq_resused++]); | 400 | args->buffer = page_address(*(rqstp->rq_next_page++)); |
400 | 401 | ||
401 | return xdr_argsize_check(rqstp, p); | 402 | return xdr_argsize_check(rqstp, p); |
402 | } | 403 | } |