summaryrefslogtreecommitdiff
path: root/include/linux/sunrpc
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2022-09-13 00:22:56 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-21 15:54:00 +0300
commitd08acee648f1e1237a3b045a7af382d434a779fb (patch)
treef48c3cef5a6b5e13f9f0f7bc64fbbdb2e6549c18 /include/linux/sunrpc
parent5e76b25d7cc82c148d391c0c43b884e6427cb302 (diff)
downloadlinux-d08acee648f1e1237a3b045a7af382d434a779fb.tar.xz
NFSD: Refactor common code out of dirlist helpers
[ Upstream commit 98124f5bd6c76699d514fbe491dd95265369cc99 ] The dust has settled a bit and it's become obvious what code is totally common between nfsd_init_dirlist_pages() and nfsd3_init_dirlist_pages(). Move that common code to SUNRPC. The new helper brackets the existing xdr_init_decode_pages() API. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r--include/linux/sunrpc/xdr.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
index 59d99ff31c1a..c1c50eaae472 100644
--- a/include/linux/sunrpc/xdr.h
+++ b/include/linux/sunrpc/xdr.h
@@ -239,6 +239,8 @@ typedef int (*kxdrdproc_t)(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf,
__be32 *p, struct rpc_rqst *rqst);
+extern void xdr_init_encode_pages(struct xdr_stream *xdr, struct xdr_buf *buf,
+ struct page **pages, struct rpc_rqst *rqst);
extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes);
extern int xdr_reserve_space_vec(struct xdr_stream *xdr, struct kvec *vec,
size_t nbytes);