• Chuck Lever's avatar
    xprtrdma: xprt_release_rqst_cong is called outside of transport_lock · 91ca1866
    Chuck Lever authored
    Since commit ce7c252a ("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 e7ce710a ("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: default avatarChuck Lever <chuck.lever@oracle.com>
    Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
    91ca1866
rpc_rdma.c 37.2 KB