SUNRPC: Fix races when closing the socket
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 29 Oct 2021 16:26:17 +0000 (12:26 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 4 Nov 2021 23:46:19 +0000 (19:46 -0400)
commitd896ba8300ebd09e5fc9c43051d9eb36b65e996e
tree7ca16fb82801fa28a737440a3a2985a532090125
parent127becabad7bef13b2e2ab795953cf8e9cce8aab
SUNRPC: Fix races when closing the socket

Ensure that we bump the xprt->connect_cookie when we set the
XPRT_CLOSE_WAIT flag so that another call to
xprt_conditional_disconnect() won't race with the reconnection.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/xprt.c
net/sunrpc/xprtsock.c