svcrdma: Add a "deferred close" helper
authorChuck Lever <chuck.lever@oracle.com>
Sat, 20 Feb 2021 23:53:40 +0000 (18:53 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 22 Mar 2021 17:22:13 +0000 (13:22 -0400)
commite844d307d46cfa7e09cdb671941bfd5f1be86773
treec5fad5b7c90452b8ca93f4ac1ec26337eca9df18
parentc558d47596867ff1082fd7475b63670f63f7f5cf
svcrdma: Add a "deferred close" helper

Refactor a bit of commonly used logic so that every site that wants
a close deferred to an nfsd thread does all the right things
(set_bit(XPT_CLOSE) then enqueue).

Also, once XPT_CLOSE is set on a transport, it is never cleared. If
XPT_CLOSE is already set, then the close is already being handled
and the enqueue can be skipped.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
include/linux/sunrpc/svc_xprt.h
net/sunrpc/svc_xprt.c
net/sunrpc/svcsock.c
net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
net/sunrpc/xprtrdma/svc_rdma_rw.c
net/sunrpc/xprtrdma/svc_rdma_sendto.c
net/sunrpc/xprtrdma/svc_rdma_transport.c