io_uring: return iovec from __io_import_iovec
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 15 Oct 2021 16:09:14 +0000 (17:09 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 19 Oct 2021 11:49:56 +0000 (05:49 -0600)
commitcaa8fe6e86fd32e26d05f724e07ec826807c6ad4
tree0c62843649e25848da9e6e16e2654ce19b373750
parentd1d681b0846af8585904be562610bdfc70bf21aa
io_uring: return iovec from __io_import_iovec

We pass iovec** into __io_import_iovec(), which should keep it,
initialise and modify accordingly. It's expensive, return it directly
from __io_import_iovec encoding errors with ERR_PTR if needed.

io_import_iovec keeps the old interface, but it's inline and so
everything is optimised nicely.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/6230e9769982f03a8f86fa58df24666088c44d3e.1634314022.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c