diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2021-02-04 11:59:07 -0500 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2021-02-05 11:16:55 -0500 |
commit | 54e6aec57c251e36a4c3153ccfee9538f2ec1bcf (patch) | |
tree | 20d8947b8e9ea61f500af994e13ea66b8e632ce9 /net/sunrpc/xprtrdma/rpc_rdma.c | |
parent | 9929f4adce3679b08262b9193fbe0e04d65abb11 (diff) |
xprtrdma: Simplify rpcrdma_convert_kvec() and frwr_map()
Clean up.
Remove a conditional branch from the SGL set-up loop in frwr_map():
Instead of using either sg_set_page() or sg_set_buf(), initialize
the mr_page field properly when rpcrdma_convert_kvec() converts the
kvec to an SGL entry. frwr_map() can then invoke sg_set_page()
unconditionally.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Tom Talpey <tom@talpey.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/xprtrdma/rpc_rdma.c')
-rw-r--r-- | net/sunrpc/xprtrdma/rpc_rdma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c index 57f9217048d8..b36b9aae0588 100644 --- a/net/sunrpc/xprtrdma/rpc_rdma.c +++ b/net/sunrpc/xprtrdma/rpc_rdma.c @@ -213,7 +213,7 @@ static struct rpcrdma_mr_seg * rpcrdma_convert_kvec(struct kvec *vec, struct rpcrdma_mr_seg *seg, unsigned int *n) { - seg->mr_page = NULL; + seg->mr_page = virt_to_page(vec->iov_base); seg->mr_offset = vec->iov_base; seg->mr_len = vec->iov_len; ++seg; |