io_uring: remove redundant memory barrier in io_req_local_work_add
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 6 Oct 2022 01:06:10 +0000 (02:06 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 7 Oct 2022 18:25:31 +0000 (12:25 -0600)
commit2a97bb7a223c8a8bcb1f90191c1fdd731c367e48
tree719f87352257b386b7ee38cbd6e9dc8a6fbd52db
parentbe4af92cf8a799a5f3c387068893ead0ba0fbb97
io_uring: remove redundant memory barrier in io_req_local_work_add

io_cqring_wake() needs a barrier for the waitqueue_active() check.
However, in the case of io_req_local_work_add(), we call llist_add()
first, which implies an atomic. Hence we can replace smb_mb() with
smp_mb__after_atomic().

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/43983bc8bc507172adda7a0f00cab1aff09fd238.1665018309.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c
io_uring/io_uring.h