io_uring: refactor file tables alloc/free
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 1 Apr 2021 14:44:03 +0000 (15:44 +0100)
committerJens Axboe <axboe@kernel.dk>
Sun, 4 Apr 2021 21:28:42 +0000 (15:28 -0600)
commitc3a3fc799451007f87fb8f5aea8a62b02d8a581f
treeca9d1a675a0f8bdaceb07dfc4dac7b809ef1d63b
parent995b23963e6ef1f9787d903e28a8ff153a4717f3
io_uring: refactor file tables alloc/free

Introduce a heler io_free_file_tables() doing all the cleaning, there
are several places where it's hand coded. Also move all allocations into
io_sqe_alloc_file_tables() and rename it, so all of it is in one place.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/502a84ebf41ff119b095e59661e678eacb752bf8.1617287883.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c