sunrpc: Fix potential race conditions in rpc_sysfs_xprt_state_change()
authorAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 15 Nov 2021 16:54:25 +0000 (11:54 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 13 Jan 2022 14:36:58 +0000 (09:36 -0500)
commit1a48db3fef499f615b56093947ec4b0d3d8e3021
tree9e3a4329e9b28aaea39c1e1523dcd43b68f4e29f
parent776d794f28c95051bc70405a7b1fa40115658a18
sunrpc: Fix potential race conditions in rpc_sysfs_xprt_state_change()

We need to use test_and_set_bit() when changing xprt state flags to
avoid potentially getting xps->xps_nactive out of sync.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/sysfs.c