summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs3proc.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2012-12-10 18:01:37 -0500
committerJ. Bruce Fields <bfields@redhat.com>2012-12-17 22:00:16 -0500
commitafc59400d6c65bad66d4ad0b2daf879cbff8e23e (patch)
treecc4c1c4dcf01106259d4f18d637cb2d1115ef980 /fs/nfsd/nfs3proc.c
parent79f77bf9a4e3dd5ead006b8f17e7c4ff07d8374e (diff)
downloadlinux-afc59400d6c65bad66d4ad0b2daf879cbff8e23e.tar.bz2
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/nfs3proc.c')
-rw-r--r--fs/nfsd/nfs3proc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c
index 97d90d1c8608..1fc02dfdc5c4 100644
--- a/fs/nfsd/nfs3proc.c
+++ b/fs/nfsd/nfs3proc.c
@@ -460,7 +460,7 @@ nfsd3_proc_readdirplus(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp,
__be32 nfserr;
int count = 0;
loff_t offset;
- int i;
+ struct page **p;
caddr_t page_addr = NULL;
dprintk("nfsd: READDIR+(3) %s %d bytes at %d\n",
@@ -484,8 +484,8 @@ nfsd3_proc_readdirplus(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp,
&resp->common,
nfs3svc_encode_entry_plus);
memcpy(resp->verf, argp->verf, 8);
- for (i=1; i<rqstp->rq_resused ; i++) {
- page_addr = page_address(rqstp->rq_respages[i]);
+ for (p = rqstp->rq_respages + 1; p < rqstp->rq_next_page; p++) {
+ page_addr = page_address(*p);
if (((caddr_t)resp->buffer >= page_addr) &&
((caddr_t)resp->buffer < page_addr + PAGE_SIZE)) {