xprtrdma: xprt_release_rqst_cong is called outside of transport_lock
authorChuck Lever <chuck.lever@oracle.com>
Mon, 1 Oct 2018 18:25:09 +0000 (14:25 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 2 Oct 2018 19:26:30 +0000 (15:26 -0400)
commit91ca18660e195df426522b29190940abb3010425
tree15282ee417a2595e8cb463f6a7cbec4d133a5273
parent17b57b1883c1285f3d0dc2266e8f79286a7bef38
xprtrdma: xprt_release_rqst_cong is called outside of transport_lock

Since commit ce7c252a8c74 ("SUNRPC: Add a separate spinlock to
protect the RPC request receive list") the RPC/RDMA reply handler
has been calling xprt_release_rqst_cong without holding
xprt->transport_lock.

I think the only way this call is ever made is if the credit grant
increases and there are RPCs pending. Current server implementations
do not change their credit grant during operation (except at
connect time).

Commit e7ce710a8802 ("xprtrdma: Avoid deadlock when credit window is
reset") added the ->release_rqst call because UDP invokes
xprt_adjust_cwnd(), which calls __xprt_put_cong() after adjusting
xprt->cwnd. Both xprt_release() and ->xprt_release_xprt already wake
another task in this case, so it is safe to remove this call from
the reply handler.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/rpc_rdma.c