diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2016-01-07 14:48:55 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-01-19 15:30:47 -0500 |
commit | 3d61677c4d5f40529fb26c8f45c0d3a1bba47c66 (patch) | |
tree | 4e4fc842c6f43cb668f06d584e1b4ca7a51f3347 /net | |
parent | c3efe7500add077f79d37b18e9c66df6621409b6 (diff) | |
download | blackbird-op-linux-3d61677c4d5f40529fb26c8f45c0d3a1bba47c66.tar.gz blackbird-op-linux-3d61677c4d5f40529fb26c8f45c0d3a1bba47c66.zip |
svcrdma: Clean up rdma_create_xprt()
kzalloc is used here, so setting the atomic fields to zero is
unnecessary. sc_ord is set again in handle_connect_req. The other
fields are re-initialized in svc_rdma_accept().
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Acked-by: Bruce Fields <bfields@fieldses.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_transport.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index 4d695afdaf8b..45d1824a5426 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c @@ -529,14 +529,6 @@ static struct svcxprt_rdma *rdma_create_xprt(struct svc_serv *serv, spin_lock_init(&cma_xprt->sc_rq_dto_lock); spin_lock_init(&cma_xprt->sc_frmr_q_lock); - cma_xprt->sc_ord = svcrdma_ord; - - cma_xprt->sc_max_req_size = svcrdma_max_req_size; - cma_xprt->sc_max_requests = svcrdma_max_requests; - cma_xprt->sc_sq_depth = svcrdma_max_requests * RPCRDMA_SQ_DEPTH_MULT; - atomic_set(&cma_xprt->sc_sq_count, 0); - atomic_set(&cma_xprt->sc_ctxt_used, 0); - if (listener) set_bit(XPT_LISTENER, &cma_xprt->sc_xprt.xpt_flags); @@ -918,6 +910,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) (size_t)RPCSVC_MAXPAGES); newxprt->sc_max_sge_rd = min_t(size_t, dev->attrs.max_sge_rd, RPCSVC_MAXPAGES); + newxprt->sc_max_req_size = svcrdma_max_req_size; newxprt->sc_max_requests = min((size_t)dev->attrs.max_qp_wr, (size_t)svcrdma_max_requests); newxprt->sc_sq_depth = RPCRDMA_SQ_DEPTH_MULT * newxprt->sc_max_requests; |