io_uring: move all io_kiocb init early in io_init_req()
authorJens Axboe <axboe@kernel.dk>
Tue, 9 Mar 2021 14:02:21 +0000 (07:02 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Mar 2021 14:28:43 +0000 (07:28 -0700)
commit93e68e036c2fc1ce18e784418e4e19975a5882b4
tree7471852a31bcc994b2753d46a0021c0632f8ba63
parent70e35125093b05b0e607ba1f5358ddf76946756c
io_uring: move all io_kiocb init early in io_init_req()

If we hit an error path in the function, make sure that the io_kiocb is
fully initialized at that point so that freeing the request always sees
a valid state.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c