diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2022-09-21 13:17:47 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-09-21 21:15:02 +0200 |
commit | 47b4c68660752facfa6247b1fc9ca9d722b8b601 (patch) | |
tree | d578f234cdbfaa7722112d92b222e08ee9dc7b76 /io_uring/rw.h | |
parent | io_uring: add custom opcode hooks on fail (diff) | |
download | linux-47b4c68660752facfa6247b1fc9ca9d722b8b601.tar.xz linux-47b4c68660752facfa6247b1fc9ca9d722b8b601.zip |
io_uring/rw: don't lose partial IO result on fail
A partially done read/write may end up in io_req_complete_failed() and
loose the result, make sure we return the number of bytes processed.
Cc: stable@vger.kernel.org
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/05e0879c226bcd53b441bf92868eadd4bf04e2fc.1663668091.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/rw.h')
-rw-r--r-- | io_uring/rw.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/io_uring/rw.h b/io_uring/rw.h index 0204c3fcafa5..3b733f4b610a 100644 --- a/io_uring/rw.h +++ b/io_uring/rw.h @@ -21,3 +21,4 @@ int io_readv_prep_async(struct io_kiocb *req); int io_write(struct io_kiocb *req, unsigned int issue_flags); int io_writev_prep_async(struct io_kiocb *req); void io_readv_writev_cleanup(struct io_kiocb *req); +void io_rw_fail(struct io_kiocb *req); |