Skip to content

Commit 3a90159

Browse files
committed
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: 3a6820f ("io_uring: add non-vectored read/write commands") Signed-off-by: Jens Axboe <[email protected]>
1 parent 2a44f46 commit 3a90159

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/io_uring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2075,7 +2075,7 @@ static ssize_t io_import_iovec(int rw, struct io_kiocb *req,
20752075
ssize_t ret;
20762076
ret = import_single_range(rw, buf, sqe_len, *iovec, iter);
20772077
*iovec = NULL;
2078-
return ret;
2078+
return ret < 0 ? ret : sqe_len;
20792079
}
20802080

20812081
if (req->io) {

0 commit comments

Comments
 (0)