Messages in this thread Patch in this message | | | Subject | [PATCH 3/11] rpcsvc-pages | From | Andreas Gruenbacher <> | Date | Mon, 26 Apr 2004 12:28:47 +0200 |
| |
Add a page to an rpc reply from the allocated pool
Andreas Gruenbacher <agruen@suse.de>, SUSE Labs
Index: linux-2.6.6-rc2/include/linux/sunrpc/svc.h =================================================================== --- linux-2.6.6-rc2.orig/include/linux/sunrpc/svc.h +++ linux-2.6.6-rc2/include/linux/sunrpc/svc.h @@ -177,6 +177,17 @@ xdr_ressize_check(struct svc_rqst *rqstp return 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)
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |