summaryrefslogtreecommitdiff
path: root/include
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-04-10 17:19:17 +0300
commitcab5399262ec8ac682953cdfe60738bfe29392b7 (patch)
treee86c7350ce2ead6f92a49b4145ebf416eba6d909 /include
parent07b68ff5c71cf4ed5443016d8eb116863c0a4d88 (diff)
downloadlinux-cab5399262ec8ac682953cdfe60738bfe29392b7.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>
Diffstat (limited to 'include')
-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 3a2c714d6b62..98e197376a0d 100644
--- a/include/linux/sunrpc/xdr.h
+++ b/include/linux/sunrpc/xdr.h
@@ -240,6 +240,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);