]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: reinforce cancel on flush during exit
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 28 Jan 2021 23:23:42 +0000 (23:23 +0000)
committerJens Axboe <axboe@kernel.dk>
Fri, 29 Jan 2021 00:04:24 +0000 (17:04 -0700)
commit3213a773c4cde894e05cd8158c909f0408ecd2e2
treeaaf8c483c0db69204c4dfa9bbb1d12a2ae5d0ba7
parent62a059d0b2ca5f20ec0b2cb8efb19501bcbf84e6
io_uring: reinforce cancel on flush during exit

What 6dd0603e08e79 ("io_uring: if we see flush on exit, cancel related tasks")
really wants is to cancel all relevant REQ_F_INFLIGHT requests reliably.
That can be achieved by io_uring_cancel_files(), but we'll miss it
calling io_uring_cancel_task_requests(files=NULL) from io_uring_flush(),
because it will go through __io_uring_cancel_task_requests().

Just always call io_uring_cancel_files() during cancel, it's good enough
for now.

Cc: stable@vger.kernel.org # 5.9+
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c