rpcsvc-pages
Subsystems (2)
PATCH 3/11 rpcsvc-pages
Add a page to an rpc reply from the allocated pool
Andreas Gruenbacher <[email protected]>, SUSE Labs
include/linux/sunrpc/svc.h +11 -0
@@ -177,6 +177,17 @@ xdr_ressize_check(struct svc_rqst *rqstpreturn vec->iov_len <=PAGE_SIZE ; } +static inline struct page * +svc_take_res_page (struct svc_rqst *rqstp) +{ +if (rqstp->rq_arghi <= rqstp->rq_argused) +return NULL ; + rqstp->rq_arghi--; + rqstp->rq_respages[rqstp->rq_resused] = + rqstp->rq_argpages[rqstp->rq_arghi]; +return rqstp->rq_respages[rqstp->rq_resused++]; +} +static inline int svc_take_page (struct svc_rqst *rqstp) {if (rqstp->rq_arghi <= rqstp->rq_argused)