io_uring: deduplicate core cancellations sequence
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 4 Feb 2021 13:51:56 +0000 (13:51 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 4 Feb 2021 15:05:46 +0000 (08:05 -0700)
commit9936c7c2bc76a0b2276f6d19de6d1d92f03deeab
treeaede1877a882ce913b7c7b1ca75bbdcc3ee88977
parent57cd657b8272a66277c139e7bbdc8b86057cb415
io_uring: deduplicate core cancellations sequence

Files and task cancellations go over same steps trying to cancel
requests in io-wq, poll, etc. Deduplicate it with a helper.

note: new io_uring_try_cancel_requests() is former
__io_uring_cancel_task_requests() with files passed as an agrument and
flushing overflowed requests.

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