summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-02-28 08:25:12 -0700
committerJens Axboe <axboe@kernel.dk>2020-02-28 08:25:12 -0700
commit566180209fc4d9e3ee8852315a4411ee0c3d5510 (patch)
tree0436de1b861caf4d2bd78f1a46ecc517cd56d746
parente42430c22b66fb49f4d8ef11423ae154d258fc20 (diff)
downloadliburing-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.h5
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;
}