]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit070ada82e792836dcecf2f32ded11fba8292e6e8
tree15282ee417a2595e8cb463f6a7cbec4d133a5273
parent90835fa706272fa584ad47aacc29bbff382f9593
xprtrdma: xprt_release_rqst_cong is called outside of transport_lock

Since commit 8bd766bd6d9a ("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 e70f01d8867a ("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