io_uring: Fix use of XArray in __io_uring_files_cancel
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 9 Oct 2020 12:49:51 +0000 (13:49 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 12 Oct 2020 20:59:33 +0000 (14:59 -0600)
commit282757c38c41e30a8dc0098eb8f6d879acf0553b
tree799344ba22c536e058d0a02d86cf469e25593ad7
parenta75c719112c0f75eb9838a7fec97d3e0f24f118b
io_uring: Fix use of XArray in __io_uring_files_cancel

commit ce765372bc443573d1d339a2bf4995de385dea3a upstream.

We have to drop the lock during each iteration, so there's no advantage
to using the advanced API.  Convert this to a standard xa_for_each() loop.

Reported-by: syzbot+27c12725d8ff0bfe1a13@syzkaller.appspotmail.com
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c