diff options
author | Jens Axboe <axboe@kernel.dk> | 2020-02-28 08:25:12 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-02-28 08:25:12 -0700 |
commit | 566180209fc4d9e3ee8852315a4411ee0c3d5510 (patch) | |
tree | 0436de1b861caf4d2bd78f1a46ecc517cd56d746 | |
parent | e42430c22b66fb49f4d8ef11423ae154d258fc20 (diff) | |
download | liburing-566180209fc4d9e3ee8852315a4411ee0c3d5510.tar.gz liburing-566180209fc4d9e3ee8852315a4411ee0c3d5510.tar.bz2 |
io_uring_prep_splice: fix 32-bit compat off_in truncation
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | src/include/liburing.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h index c0d00a9..fce4fef 100644 --- a/src/include/liburing.h +++ b/src/include/liburing.h @@ -197,9 +197,8 @@ static inline void io_uring_prep_splice(struct io_uring_sqe *sqe, unsigned int nbytes, unsigned int splice_flags) { - io_uring_prep_rw(IORING_OP_SPLICE, sqe, fd_out, - (void *) (uintptr_t) off_in, - nbytes, off_out); + io_uring_prep_rw(IORING_OP_SPLICE, sqe, fd_out, NULL, nbytes, off_out); + sqe->splice_off_in = off_in; sqe->splice_fd_in = fd_in; sqe->splice_flags = splice_flags; } |