io_uring: improve io_fail_links()
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 25 Jun 2022 10:52:58 +0000 (11:52 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jul 2022 00:39:16 +0000 (18:39 -0600)
commit37c7bd31b3e9e4b6aee3c5227f789c0b586a33a2
treedce2f51288972fb8fa8dd77e3832b80c377124e4
parentfe991a7688f894a74a6f6b4933bf6cd5fa086c1b
io_uring: improve io_fail_links()

io_fail_links() is called with ->completion_lock held and for that
reason we'd want to keep it as small as we can. Instead of doing
__io_req_complete_post() for each linked request under the lock, fail
them in a task_work handler under ->uring_lock.

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