]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: alloc ->io in io_req_defer_prep()
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 15 Jul 2020 09:46:51 +0000 (12:46 +0300)
committerJens Axboe <axboe@kernel.dk>
Fri, 24 Jul 2020 19:00:44 +0000 (13:00 -0600)
commitd01bfd42981fc0f43947944717f15a32e0fdb9f4
treeadc3e69cbb160bae75e766b5934d84f5d719f288
parent4a04e0fc94d5b60db46273fe448548a752b4104d
io_uring: alloc ->io in io_req_defer_prep()

Every call to io_req_defer_prep() is prepended with allocating ->io,
just do that in the function. And while we're at it, mark error paths
with unlikey and replace "if (ret < 0)" with "if (ret)".

There is only one change in the observable behaviour, that's instead of
killing the head request right away on error, it postpones it until the
link is assembled, that looks more preferable.

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