io_uring: fix linked deferred ->files cancellation
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 5 Sep 2020 21:45:15 +0000 (00:45 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Sep 2020 12:22:12 +0000 (14:22 +0200)
commit87d8175e9c3de7b12584ec80baa5d4cc436b66da
tree17af75c7251114295241fbf2a046cf5b3b61c915
parentf5fea75f4ea401df7870ef7bf510c62ac9268745
io_uring: fix linked deferred ->files cancellation

[ Upstream commit c127a2a1b7baa5eb40a7e2de4b7f0c51ccbbb2ef ]

While looking for ->files in ->defer_list, consider that requests there
may actually be links.

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