io_uring: use iov_iter state save/restore helpers
authorJens Axboe <axboe@kernel.dk>
Fri, 10 Sep 2021 17:19:14 +0000 (11:19 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 14 Sep 2021 14:12:49 +0000 (08:12 -0600)
commit35ec0d37cb39d7c5853de5d3bf1830b55bbaed1a
treeb7fd2cc9d294d20db92c3423549d9ff5484b4c7c
parent8fb0f47a9d7acf620d0fd97831b69da9bc5e22ed
io_uring: use iov_iter state save/restore helpers

Get rid of the need to do re-expand and revert on an iterator when we
encounter a short IO, or failure that warrants a retry. Use the new
state save/restore helpers instead.

We keep the iov_iter_state persistent across retries, if we need to
restart the read or write operation. If there's a pending retry, the
operation will always exit with the state correctly saved.

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