io_uring: cancel reqs of all iowq's on ring exit
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 6 Mar 2021 11:02:17 +0000 (11:02 +0000)
committerJens Axboe <axboe@kernel.dk>
Sun, 7 Mar 2021 21:12:43 +0000 (14:12 -0700)
commit1b00764f09b6912d25e188d972a7764a457926ba
treeecc1cca3718dca31022a575daf26961671959401
parentb5bb3a24f69da92e0ec2a301452364333e45be03
io_uring: cancel reqs of all iowq's on ring exit

io_ring_exit_work() have to cancel all requests, including those staying
in io-wq, however it tries only cancellation of current tctx, which is
NULL. If we've got task==NULL, use the ctx-to-tctx map to go over all
tctx/io-wq and try cancellations on them.

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