]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: always batch cancel in *cancel_files()
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 6 Nov 2020 13:00:26 +0000 (13:00 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 9 Dec 2020 19:04:00 +0000 (12:04 -0700)
commitb3d6860727d7126fed12dd003a3ed520bf283320
tree97fc9338ff86d0e7c8a0b6eedaa3e49b38dd83bd
parent9625e7cbe7056c1e3e45935f72fc90f2b1ffb76c
io_uring: always batch cancel in *cancel_files()

Instead of iterating over each request and cancelling it individually in
io_uring_cancel_files(), try to cancel all matching requests and use
->inflight_list only to check if there anything left.

In many cases it should be faster, and we can reuse a lot of code from
task cancellation.

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