io_uring: add io_disarm_next() helper
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 9 Mar 2021 00:37:58 +0000 (00:37 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Mar 2021 14:28:42 +0000 (07:28 -0700)
commit33cc89a9fc248a486857381584cc6b67d9405fab
tree18ab08aa5f5391d9adf3b7b64f31db5316d1c666
parent97a73a0f9fbfb2be682fd037814576dbfa0e0da8
io_uring: add io_disarm_next() helper

A preparation patch placing all preparations before extracting a next
request into a separate helper io_disarm_next().

Also, don't spuriously do ev_posted in a rare case where REQ_F_FAIL_LINK
is set but there are no requests linked (i.e. after cancelling a linked
timeout or setting IOSQE_IO_LINK on a last request of a submission
batch).

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