diff options
| author | Caleb Sander Mateos <csander@purestorage.com> | 2025-09-01 19:26:07 -0600 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-09-03 17:34:36 -0600 |
| commit | dd386b0d5e61556927189cd7b59a628d22cb6851 (patch) | |
| tree | 0d2241f6c518a558427cf1f5b43bafcbe4723922 /io_uring/uring_cmd.c | |
| parent | io_uring/uring_cmd: add io_uring_cmd_tw_t type alias (diff) | |
| download | linux-dd386b0d5e61556927189cd7b59a628d22cb6851.tar.gz linux-dd386b0d5e61556927189cd7b59a628d22cb6851.zip | |
io_uring/uring_cmd: correct io_uring_cmd_done() ret type
io_uring_cmd_done() takes the result code for the CQE as a ssize_t ret
argument. However, the CQE res field is a s32 value, as is the argument
to io_req_set_res(). To clarify that only s32 values can be faithfully
represented without truncation, change io_uring_cmd_done()'s ret
argument type to s32.
Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Link: https://lore.kernel.org/r/20250902012609.1513123-1-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/uring_cmd.c')
| -rw-r--r-- | io_uring/uring_cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c index d76d6d27765c..5562e8491c5b 100644 --- a/io_uring/uring_cmd.c +++ b/io_uring/uring_cmd.c @@ -151,7 +151,7 @@ static inline void io_req_set_cqe32_extra(struct io_kiocb *req, * Called by consumers of io_uring_cmd, if they originally returned * -EIOCBQUEUED upon receiving the command. */ -void io_uring_cmd_done(struct io_uring_cmd *ioucmd, ssize_t ret, u64 res2, +void io_uring_cmd_done(struct io_uring_cmd *ioucmd, s32 ret, u64 res2, unsigned issue_flags) { struct io_kiocb *req = cmd_to_io_kiocb(ioucmd); |
