diff options
author | J. Bruce Fields <bfields@redhat.com> | 2012-12-10 18:01:37 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-12-17 22:00:16 -0500 |
commit | afc59400d6c65bad66d4ad0b2daf879cbff8e23e (patch) | |
tree | cc4c1c4dcf01106259d4f18d637cb2d1115ef980 /fs/nfsd/nfsxdr.c | |
parent | 79f77bf9a4e3dd5ead006b8f17e7c4ff07d8374e (diff) |
nfsd4: cleanup: replace rq_resused count by rq_next_page pointer
It may be a matter of personal taste, but I find this makes the code
clearer.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
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 | } |