Skip to content

Commit

Permalink
svcrdma: Const-ify the xdr_buf arguments
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chuck Lever committed Nov 30, 2020
1 parent 5a7e702 commit 51bad8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/sunrpc/xprtrdma/svc_rdma_rw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 51bad8c

Please sign in to comment.