]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: refactor io_cqring_wait
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 4 Feb 2021 13:51:58 +0000 (13:51 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 4 Feb 2021 15:05:46 +0000 (08:05 -0700)
commit12793578602e324907b4e3f1a16c143b475e1b92
treefc4101dcc7c860897ea716bc08693eee49ecdc25
parent33369d822dc5a67f376cd618fdfee75d05639553
io_uring: refactor io_cqring_wait

It's easy to make a mistake in io_cqring_wait() because for all
break/continue clauses we need to watch for prepare/finish_wait to be
used correctly. Extract all those into a new helper
io_cqring_wait_schedule(), and transforming the loop into simple series
of func calls: prepare(); check_and_schedule(); finish();

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c