]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: serialize ctx->rings->sq_flags with atomic_or/and
authorJens Axboe <axboe@kernel.dk>
Tue, 26 Apr 2022 01:49:00 +0000 (19:49 -0600)
committerJens Axboe <axboe@kernel.dk>
Sat, 30 Apr 2022 14:39:54 +0000 (08:39 -0600)
commitac8ef0fbee6d0812fa0e0498e171e39ceb1a3acb
tree2af53035431195f4b74f47fb00a196ea89dda8d0
parent63795abce17da2f6ee07882a16e26f3bbe75b92c
io_uring: serialize ctx->rings->sq_flags with atomic_or/and

Rather than require ctx->completion_lock for ensuring that we don't
clobber the flags, use the atomic bitop helpers instead. This removes
the need to grab the completion_lock, in preparation for needing to set
or clear sq_flags when we don't know the status of this lock.

Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/20220426014904.60384-3-axboe@kernel.dk
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c