diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2020-03-13 17:42:10 +0300 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2020-11-30 21:00:21 +0300 |
commit | 51bad8cc1301f14ebf6840a6d8098520553ed5d5 (patch) | |
tree | cb8ce8c2b66c804f3bfb6f02ebbb9dedb56041c0 /net/sunrpc/xprtrdma | |
parent | 5a7e702670adc368caa1b64c2138956d8cba0d4f (diff) | |
download | linux-51bad8cc1301f14ebf6840a6d8098520553ed5d5.tar.xz |
svcrdma: Const-ify the xdr_buf arguments
Clean up: Ensure the code in rw.c does not modify the argument, and
enable callers to also use "const struct xdr_buf *".
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'net/sunrpc/xprtrdma')
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_rw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_rw.c b/net/sunrpc/xprtrdma/svc_rdma_rw.c index 7c50eddb8d3c..aeed4e200949 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_rw.c +++ b/net/sunrpc/xprtrdma/svc_rdma_rw.c @@ -197,7 +197,7 @@ struct svc_rdma_write_info { __be32 *wi_segs; /* SGL constructor arguments */ - struct xdr_buf *wi_xdr; + const struct xdr_buf *wi_xdr; unsigned char *wi_base; unsigned int wi_next_off; @@ -405,7 +405,7 @@ static void svc_rdma_pagelist_to_sg(struct svc_rdma_write_info *info, struct svc_rdma_rw_ctxt *ctxt) { unsigned int sge_no, sge_bytes, page_off, page_no; - struct xdr_buf *xdr = info->wi_xdr; + const struct xdr_buf *xdr = info->wi_xdr; struct scatterlist *sg; struct page **page; |