io_uring: replace smp_mb() with smp_mb__after_atomic() in io_sq_thread()
authorAlmog Khaikin <almogkh@gmail.com>
Tue, 26 Apr 2022 16:34:03 +0000 (19:34 +0300)
committerJens Axboe <axboe@kernel.dk>
Tue, 26 Apr 2022 17:04:26 +0000 (11:04 -0600)
commit012b7e911e69791ea518ef3d084c12cb2b8f2914
tree9baa5e17253a3c6084e479bec4624d6f3a3b7ad9
parent6f07a54a90ee98ae13b37ac358624d7cc7e57850
io_uring: replace smp_mb() with smp_mb__after_atomic() in io_sq_thread()

The IORING_SQ_NEED_WAKEUP flag is now set using atomic_or() which
implies a full barrier on some architectures but it is not required to
do so. Use the more appropriate smp_mb__after_atomic() which avoids the
extra barrier on those architectures.

Signed-off-by: Almog Khaikin <almogkh@gmail.com>
Link: https://lore.kernel.org/r/20220426163403.112692-1-almogkh@gmail.com
Fixes: 8018823e6987 ("io_uring: serialize ctx->rings->sq_flags with atomic_or/and")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c