diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-12-04 21:16:46 +0100 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-12-14 12:51:07 +0100 |
commit | 9a20f6f4e6ba9713605fbf7e7426ca22f1181545 (patch) | |
tree | daeff278962badcaca252fa9546bc6177fba964f /include | |
parent | SUNRPC: _shift_data_left/right_pages should check the shift length (diff) | |
download | linux-9a20f6f4e6ba9713605fbf7e7426ca22f1181545.tar.xz linux-9a20f6f4e6ba9713605fbf7e7426ca22f1181545.zip |
SUNRPC: Fixes for xdr_align_data()
The main use case right now for xdr_align_data() is to shift the page
data to the left, and in practice shrink the total XDR data buffer.
This patch ensures that we fix up the accounting for the buffer length
as we shift that data around.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sunrpc/xdr.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 9548d075e06d..2b4e44bb0654 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h @@ -252,7 +252,7 @@ extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); extern unsigned int xdr_read_pages(struct xdr_stream *xdr, unsigned int len); extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); extern int xdr_process_buf(struct xdr_buf *buf, unsigned int offset, unsigned int len, int (*actor)(struct scatterlist *, void *), void *data); -extern uint64_t xdr_align_data(struct xdr_stream *, uint64_t, uint32_t); +extern unsigned int xdr_align_data(struct xdr_stream *, unsigned int offset, unsigned int length); extern uint64_t xdr_expand_hole(struct xdr_stream *, uint64_t, uint64_t); /** |