io_uring: fix multi ctx cancellation
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 20 Jun 2022 00:25:52 +0000 (01:25 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 22 Jun 2022 17:32:32 +0000 (11:32 -0600)
commitabf064848c4554dd4820d0a141e45138f6c38e90
tree397d4493c9c745f35b5a4b7c4f6cabd3be57ec5e
parentabb9030d1f03c310238a99bf42a9677217858fd0
io_uring: fix multi ctx cancellation

io_uring_try_cancel_requests() loops until there is nothing left to do
with the ring, however there might be several rings and they might have
dependencies between them, e.g. via poll requests.

Instead of cancelling rings one by one, try to cancel them all and only
then loop over if we still potenially some work to do.

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