]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit28097dc4927a7f2571081dcb57453c11efe4731c
tree7ce3c1a55b6f4c354f94bd0164411806c3413d7e
parent86a6493bda08b44f0f3723714bd309c6f0c2b116
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