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 /include | |
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 'include')
-rw-r--r-- | include/linux/sunrpc/svc.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index d83db800fe02..676ddf53b3ee 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -243,6 +243,7 @@ struct svc_rqst { | |||
243 | struct page * rq_pages[RPCSVC_MAXPAGES]; | 243 | struct page * rq_pages[RPCSVC_MAXPAGES]; |
244 | struct page * *rq_respages; /* points into rq_pages */ | 244 | struct page * *rq_respages; /* points into rq_pages */ |
245 | int rq_resused; /* number of pages used for result */ | 245 | int rq_resused; /* number of pages used for result */ |
246 | struct page * *rq_next_page; /* next reply page to use */ | ||
246 | 247 | ||
247 | struct kvec rq_vec[RPCSVC_MAXPAGES]; /* generally useful.. */ | 248 | struct kvec rq_vec[RPCSVC_MAXPAGES]; /* generally useful.. */ |
248 | 249 | ||
@@ -338,9 +339,8 @@ xdr_ressize_check(struct svc_rqst *rqstp, __be32 *p) | |||
338 | 339 | ||
339 | static inline void svc_free_res_pages(struct svc_rqst *rqstp) | 340 | static inline void svc_free_res_pages(struct svc_rqst *rqstp) |
340 | { | 341 | { |
341 | while (rqstp->rq_resused) { | 342 | while (rqstp->rq_next_page != rqstp->rq_respages) { |
342 | struct page **pp = (rqstp->rq_respages + | 343 | struct page **pp = --rqstp->rq_next_page; |
343 | --rqstp->rq_resused); | ||
344 | if (*pp) { | 344 | if (*pp) { |
345 | put_page(*pp); | 345 | put_page(*pp); |
346 | *pp = NULL; | 346 | *pp = NULL; |