io_uring: deduplicate io_grab_files() calls
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 23 Jul 2020 17:25:21 +0000 (20:25 +0300)
committerJens Axboe <axboe@kernel.dk>
Fri, 24 Jul 2020 19:00:46 +0000 (13:00 -0600)
commitf56040b81999871973d21f334b4657957422c90e
tree8dae496b24ca65e22a0922d54b0f061f713904aa
parentae34817bd93e373a03203a4c6892735c430a14e1
io_uring: deduplicate io_grab_files() calls

Move io_req_init_async() into io_grab_files(), it's safer this way. Note
that io_queue_async_work() does *init_async(), so it's valid to move out
of __io_queue_sqe() punt path. Also, add a helper around io_grab_files().

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