io_uring: don't iterate io_uring_cancel_files()
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 9 Feb 2021 04:47:37 +0000 (04:47 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Feb 2021 12:54:55 +0000 (13:54 +0100)
commit49250f33bb436a29387f80cc64d1f40eba1ae19e
treeb76cefd65be90f17ec8c8df7f332ec2a67f2938b
parentf6d93f855553b96d7b53ceddc0438d28de5b94df
io_uring: don't iterate io_uring_cancel_files()

[ Upstream commit b52fda00dd9df8b4a6de5784df94f9617f6133a1 ]

io_uring_cancel_files() guarantees to cancel all matching requests,
that's not necessary to do that in a loop. Move it up in the callchain
into io_uring_cancel_task_requests().

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