diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2018-10-01 14:16:01 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2018-10-29 16:58:04 -0400 |
commit | 596f2a1950437095fee3062b75935c3bfdda0289 (patch) | |
tree | a6b623f4b58518a8f3f0cee8967ecab7bbced187 | |
parent | f3c1fd0ee294abd4367dfa72d89f016c682202f0 (diff) |
svcrdma: Remove ->release_rqst call in bc reply handler
Similar to a change made in the client's forward channel reply
handler: The xprt_release_rqst_cong() call is not necessary.
Also, release xprt->recv_lock when taking xprt->transport_lock
to avoid disabling and enabling BH's while holding another
spin lock.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_backchannel.c b/net/sunrpc/xprtrdma/svc_rdma_backchannel.c index a68180090554..642f0310cc16 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_backchannel.c +++ b/net/sunrpc/xprtrdma/svc_rdma_backchannel.c | |||
@@ -32,7 +32,6 @@ int svc_rdma_handle_bc_reply(struct rpc_xprt *xprt, __be32 *rdma_resp, | |||
32 | struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt); | 32 | struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt); |
33 | struct kvec *dst, *src = &rcvbuf->head[0]; | 33 | struct kvec *dst, *src = &rcvbuf->head[0]; |
34 | struct rpc_rqst *req; | 34 | struct rpc_rqst *req; |
35 | unsigned long cwnd; | ||
36 | u32 credits; | 35 | u32 credits; |
37 | size_t len; | 36 | size_t len; |
38 | __be32 xid; | 37 | __be32 xid; |
@@ -66,6 +65,8 @@ int svc_rdma_handle_bc_reply(struct rpc_xprt *xprt, __be32 *rdma_resp, | |||
66 | if (dst->iov_len < len) | 65 | if (dst->iov_len < len) |
67 | goto out_unlock; | 66 | goto out_unlock; |
68 | memcpy(dst->iov_base, p, len); | 67 | memcpy(dst->iov_base, p, len); |
68 | xprt_pin_rqst(req); | ||
69 | spin_unlock(&xprt->recv_lock); | ||
69 | 70 | ||
70 | credits = be32_to_cpup(rdma_resp + 2); | 71 | credits = be32_to_cpup(rdma_resp + 2); |
71 | if (credits == 0) | 72 | if (credits == 0) |
@@ -74,15 +75,13 @@ int svc_rdma_handle_bc_reply(struct rpc_xprt *xprt, __be32 *rdma_resp, | |||
74 | credits = r_xprt->rx_buf.rb_bc_max_requests; | 75 | credits = r_xprt->rx_buf.rb_bc_max_requests; |
75 | 76 | ||
76 | spin_lock_bh(&xprt->transport_lock); | 77 | spin_lock_bh(&xprt->transport_lock); |
77 | cwnd = xprt->cwnd; | ||
78 | xprt->cwnd = credits << RPC_CWNDSHIFT; | 78 | xprt->cwnd = credits << RPC_CWNDSHIFT; |
79 | if (xprt->cwnd > cwnd) | ||
80 | xprt_release_rqst_cong(req->rq_task); | ||
81 | spin_unlock_bh(&xprt->transport_lock); | 79 | spin_unlock_bh(&xprt->transport_lock); |
82 | 80 | ||
83 | 81 | spin_lock(&xprt->recv_lock); | |
84 | ret = 0; | 82 | ret = 0; |
85 | xprt_complete_rqst(req->rq_task, rcvbuf->len); | 83 | xprt_complete_rqst(req->rq_task, rcvbuf->len); |
84 | xprt_unpin_rqst(req); | ||
86 | rcvbuf->len = 0; | 85 | rcvbuf->len = 0; |
87 | 86 | ||
88 | out_unlock: | 87 | out_unlock: |