diff options
author | Jens Axboe <axboe@kernel.dk> | 2020-02-25 17:48:55 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-02-26 07:06:57 -0700 |
commit | 3a9015988b3d41027cda61f4fdeaaeee73be8b24 (patch) | |
tree | 4722ab78b6f19ec409294d30fa281f5184f5a45c /fs/io_uring.c | |
parent | 2a44f46781617c5040372b59da33553a02b1f46d (diff) | |
download | linux-3a9015988b3d41027cda61f4fdeaaeee73be8b24.tar.bz2 |
io_uring: import_single_range() returns 0/-ERROR
Unlike the other core import helpers, import_single_range() returns 0 on
success, not the length imported. This means that links that depend on
the result of non-vec based IORING_OP_{READ,WRITE} that were added for
5.5 get errored when they should not be.
Fixes: 3a6820f2bb8a ("io_uring: add non-vectored read/write commands")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index f79ca494bb56..36917c0101fd 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2075,7 +2075,7 @@ static ssize_t io_import_iovec(int rw, struct io_kiocb *req, ssize_t ret; ret = import_single_range(rw, buf, sqe_len, *iovec, iter); *iovec = NULL; - return ret; + return ret < 0 ? ret : sqe_len; } if (req->io) { |