diff options
author | 2023-10-24 14:46:58 -0400 | |
---|---|---|
committer | 2023-10-30 21:48:22 -0400 | |
commit | 2bce6368c46b835a133f7f4946eea9c4513828dd (patch) | |
tree | 9ddb4e9e192a1cb25c27d9b29641d2650be8f718 /include/linux/closure.h | |
parent | Merge tag 'objtool-core-2023-10-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (diff) | |
download | wireguard-linux-2bce6368c46b835a133f7f4946eea9c4513828dd.tar.xz wireguard-linux-2bce6368c46b835a133f7f4946eea9c4513828dd.zip |
closures: Better memory barriers
atomic_(dec|sub)_return_release() are a thing now - use them.
Also, delete the useless barrier in set_closure_fn(): it's redundant
with the memory barrier in closure_put(0.
Since closure_put() would now otherwise just have a release barrier, we
also need a new barrier when the ref hits 0 -
smp_acquire__after_ctrl_dep().
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'include/linux/closure.h')
-rw-r--r-- | include/linux/closure.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/closure.h b/include/linux/closure.h index 722a586bb224..bdab17050bc8 100644 --- a/include/linux/closure.h +++ b/include/linux/closure.h @@ -233,8 +233,6 @@ static inline void set_closure_fn(struct closure *cl, closure_fn *fn, closure_set_ip(cl); cl->fn = fn; cl->wq = wq; - /* between atomic_dec() in closure_put() */ - smp_mb__before_atomic(); } static inline void closure_queue(struct closure *cl) |