diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2017-02-07 19:58:15 +0300 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2017-02-08 22:41:24 +0300 |
commit | cbaf58032efca401834518b905f528ac912449e4 (patch) | |
tree | b1d3b67f20557bc45115931fff8df5aad433f799 /net/sunrpc/xprtrdma/svc_rdma_sendto.c | |
parent | b880092109323d1cc608c420fa712d3e19508e13 (diff) | |
download | linux-cbaf58032efca401834518b905f528ac912449e4.tar.xz |
svcrdma: Another sendto chunk list parsing update
Commit 5fdca6531434 ("svcrdma: Renovate sendto chunk list parsing")
missed a spot. svc_rdma_xdr_get_reply_hdr_len() also assumes the
Write list has only one Write chunk. There's no harm in making this
code more general.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc/xprtrdma/svc_rdma_sendto.c')
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_sendto.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c index ad4d286a83c5..ba76f1617965 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c +++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c @@ -476,7 +476,8 @@ static int send_reply(struct svcxprt_rdma *rdma, /* Prepare the SGE for the RPCRDMA Header */ ctxt->sge[0].lkey = rdma->sc_pd->local_dma_lkey; - ctxt->sge[0].length = svc_rdma_xdr_get_reply_hdr_len(rdma_resp); + ctxt->sge[0].length = + svc_rdma_xdr_get_reply_hdr_len((__be32 *)rdma_resp); ctxt->sge[0].addr = ib_dma_map_page(rdma->sc_cm_id->device, page, 0, ctxt->sge[0].length, DMA_TO_DEVICE); |