aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/xdr.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2020-03-13 10:42:09 -0400
committerChuck Lever <chuck.lever@oracle.com>2020-11-30 13:00:21 -0500
commit5a7e702670adc368caa1b64c2138956d8cba0d4f (patch)
treeae7ad2649c7f5ffd17c33e41140da3e6fd5316fd /include/linux/sunrpc/xdr.h
parentsvcrdma: Catch another Reply chunk overflow case (diff)
downloadlinux-dev-5a7e702670adc368caa1b64c2138956d8cba0d4f.tar.xz
linux-dev-5a7e702670adc368caa1b64c2138956d8cba0d4f.zip
SUNRPC: Adjust synopsis of xdr_buf_subsegment()
Clean up: This enables xdr_buf_subsegment()'s callers to pass in a const pointer to that buffer. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'include/linux/sunrpc/xdr.h')
-rw-r--r--include/linux/sunrpc/xdr.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
index 9548d075e06d..ec2a22ccdc2a 100644
--- a/include/linux/sunrpc/xdr.h
+++ b/include/linux/sunrpc/xdr.h
@@ -183,7 +183,8 @@ xdr_adjust_iovec(struct kvec *iov, __be32 *p)
*/
extern void xdr_shift_buf(struct xdr_buf *, size_t);
extern void xdr_buf_from_iov(struct kvec *, struct xdr_buf *);
-extern int xdr_buf_subsegment(struct xdr_buf *, struct xdr_buf *, unsigned int, unsigned int);
+extern int xdr_buf_subsegment(const struct xdr_buf *buf, struct xdr_buf *subbuf,
+ unsigned int base, unsigned int len);
extern void xdr_buf_trim(struct xdr_buf *, unsigned int);
extern int read_bytes_from_xdr_buf(struct xdr_buf *, unsigned int, void *, unsigned int);
extern int write_bytes_to_xdr_buf(struct xdr_buf *, unsigned int, void *, unsigned int);