io_uring: alloc req only after getting sqe
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 8 Apr 2020 05:58:44 +0000 (08:58 +0300)
committerJens Axboe <axboe@kernel.dk>
Wed, 8 Apr 2020 15:26:16 +0000 (09:26 -0600)
commitb1e50e549b1372d9742509230dc4af7dd521d984
tree7ce3c1a55b6f4c354f94bd0164411806c3413d7e
parent709b302faddfac757d87df2080f900eccb1dc9e2
io_uring: alloc req only after getting sqe

As io_get_sqe() split into 2 stage get/consume, get an sqe before
allocating io_kiocb, so no free_req*() for a failure case is needed,
and inline back __io_req_do_free(), which has only 1 user.

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