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>
Thu, 21 Jul 2022 14:46:53 +0000 (08:46 -0600)
commit4a099bf6a5fdb3b8a3ca91236e8f09c4b8051f1a
treec4f55bf48cac6456bcc865311add01cd7f283e55
parenteb25e7f4e4601b4489877ce5e8e9b7b96ac9d65d
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