SUNRPC: Fix congestion window race with disconnect
authorChuck Lever <chuck.lever@oracle.com>
Fri, 13 Sep 2019 20:01:07 +0000 (16:01 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Fri, 20 Sep 2019 19:15:24 +0000 (15:15 -0400)
commit8593e010786181df887b001824ff8f3e52e2098f
treec54e3b4ea70d7ab295622d70673d3b9862409a99
parent9ba828861c56a21d211d5d10f5643774b1ea330d
SUNRPC: Fix congestion window race with disconnect

If the congestion window closes just as the transport disconnects,
a reconnect is never driven because:

1. The XPRT_CONG_WAIT flag prevents tasks from taking the write lock
2. There's no wake-up of the first task on the xprt->sending queue

To address this, clear the congestion wait flag as part of
completing a disconnect.

Fixes: 75891f502f5f ("SUNRPC: Support for congestion control ... ")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprt.c