Revert "SUNRPC: Use RMW bitops in single-threaded hot paths"
authorChuck Lever <chuck.lever@oracle.com>
Fri, 6 Jan 2023 17:43:37 +0000 (12:43 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Jan 2023 09:33:42 +0000 (10:33 +0100)
commit8cc0e63ba86c9f4e732de9f42642231c8e3a31d2
treeb7a96b8336cff433e64f0597462365d4d91ca193
parent29fbaa434c223f29917e8de054cc48a96e6c0ed4
Revert "SUNRPC: Use RMW bitops in single-threaded hot paths"

commit 7827c81f0248e3c2f40d438b020f3d222f002171 upstream.

The premise that "Once an svc thread is scheduled and executing an
RPC, no other processes will touch svc_rqst::rq_flags" is false.
svc_xprt_enqueue() examines the RQ_BUSY flag in scheduled nfsd
threads when determining which thread to wake up next.

Found via KCSAN.

Fixes: 28df0988815f ("SUNRPC: Use RMW bitops in single-threaded hot paths")
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfs4proc.c
fs/nfsd/nfs4xdr.c
net/sunrpc/auth_gss/svcauth_gss.c
net/sunrpc/svc.c
net/sunrpc/svc_xprt.c
net/sunrpc/svcsock.c
net/sunrpc/xprtrdma/svc_rdma_transport.c