aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r--include/linux/sunrpc/svc.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index facb94488bb1..5af8800e0ce3 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -185,6 +185,17 @@ xdr_ressize_check(struct svc_rqst *rqstp, u32 *p)
185 return vec->iov_len <= PAGE_SIZE; 185 return vec->iov_len <= PAGE_SIZE;
186} 186}
187 187
188static inline struct page *
189svc_take_res_page(struct svc_rqst *rqstp)
190{
191 if (rqstp->rq_arghi <= rqstp->rq_argused)
192 return NULL;
193 rqstp->rq_arghi--;
194 rqstp->rq_respages[rqstp->rq_resused] =
195 rqstp->rq_argpages[rqstp->rq_arghi];
196 return rqstp->rq_respages[rqstp->rq_resused++];
197}
198
188static inline int svc_take_page(struct svc_rqst *rqstp) 199static inline int svc_take_page(struct svc_rqst *rqstp)
189{ 200{
190 if (rqstp->rq_arghi <= rqstp->rq_argused) 201 if (rqstp->rq_arghi <= rqstp->rq_argused)