diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-07-12 12:34:34 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-10-03 20:49:06 -0400 |
commit | 33c3214bf450051db99d352cfeef7e0ffcbb8614 (patch) | |
tree | 864bcc2fa753fb66ca37450f4b2c796f7144773d /net | |
parent | b9f8713f42af11ae6d7f63075334ba5298436be6 (diff) | |
download | linux-stable-33c3214bf450051db99d352cfeef7e0ffcbb8614.tar.gz linux-stable-33c3214bf450051db99d352cfeef7e0ffcbb8614.tar.bz2 linux-stable-33c3214bf450051db99d352cfeef7e0ffcbb8614.zip |
SUNRPC: xprt_clear_locked() only needs release memory semantics
The clearing of the XPRT_LOCKED bit has to happen after we clear
xprt->snd_task, but we don't require any extra memory barriers after
that.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/xprt.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index d4aeee83763e..48560188e84d 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c @@ -246,11 +246,9 @@ EXPORT_SYMBOL_GPL(xprt_find_transport_ident); static void xprt_clear_locked(struct rpc_xprt *xprt) { xprt->snd_task = NULL; - if (!test_bit(XPRT_CLOSE_WAIT, &xprt->state)) { - smp_mb__before_atomic(); - clear_bit(XPRT_LOCKED, &xprt->state); - smp_mb__after_atomic(); - } else + if (!test_bit(XPRT_CLOSE_WAIT, &xprt->state)) + clear_bit_unlock(XPRT_LOCKED, &xprt->state); + else queue_work(xprtiod_workqueue, &xprt->task_cleanup); } |