]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: change locking for xs_swap_enable/disable
authorNeilBrown <neilb@suse.de>
Sun, 6 Mar 2022 23:41:45 +0000 (10:41 +1100)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Sun, 13 Mar 2022 16:59:36 +0000 (12:59 -0400)
commit89628c61d0e741e3e373bcfbf8b3f790ba5c2f85
tree2a5300915884d15ad3bde2dd8e3c26de6ed02cac
parent3c4d06c831a3cbcca9b21b11bb55a3d1ea3211f3
SUNRPC: change locking for xs_swap_enable/disable

It is not in general safe to wait for XPRT_LOCKED to clear.
A wakeup is only sent when
 - connection completes
 - sock close completes
so during normal operations, this can wait indefinitely.

The event we need to protect against is ->inet being set to NULL, and
that happens under the recv_mutex lock.

So drop the handlign of XPRT_LOCKED and use recv_mutex instead.

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