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>
Wed, 12 Oct 2022 22:30:56 +0000 (16:30 -0600)
commitfc86f9d3bb4904117eea70347d323fde34a47c79
tree5c4b611b28fb3ad7f5412edcd3b057540768d1c5
parent3fb1bd68817288729179444caf1fd5c5c4d2d65d
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