Commit 33c3214b authored by Trond Myklebust's avatar Trond Myklebust

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: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent b9f8713f
...@@ -246,11 +246,9 @@ EXPORT_SYMBOL_GPL(xprt_find_transport_ident); ...@@ -246,11 +246,9 @@ EXPORT_SYMBOL_GPL(xprt_find_transport_ident);
static void xprt_clear_locked(struct rpc_xprt *xprt) static void xprt_clear_locked(struct rpc_xprt *xprt)
{ {
xprt->snd_task = NULL; xprt->snd_task = NULL;
if (!test_bit(XPRT_CLOSE_WAIT, &xprt->state)) { if (!test_bit(XPRT_CLOSE_WAIT, &xprt->state))
smp_mb__before_atomic(); clear_bit_unlock(XPRT_LOCKED, &xprt->state);
clear_bit(XPRT_LOCKED, &xprt->state); else
smp_mb__after_atomic();
} else
queue_work(xprtiod_workqueue, &xprt->task_cleanup); queue_work(xprtiod_workqueue, &xprt->task_cleanup);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment