diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-02-28 22:35:15 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-04-11 17:41:58 -0600 |
commit | 8c3f9cd1603d0e4af6c50ebc6d974ab7bdd03cf4 (patch) | |
tree | 0b864a9f16676c10b8f1c261566da7023ed3c42a /fs/io_uring.c | |
parent | 9fb8cb49c7b634982ac2a4302b5158d7120f0186 (diff) | |
download | lwn-8c3f9cd1603d0e4af6c50ebc6d974ab7bdd03cf4.tar.gz lwn-8c3f9cd1603d0e4af6c50ebc6d974ab7bdd03cf4.zip |
io_uring: use better types for cflags
__io_cqring_fill_event() takes cflags as long to squeeze it into u32 in
an CQE, awhile all users pass int or unsigned. Replace it with unsigned
int and store it as u32 in struct io_completion to match CQE.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 2642369d1332..bb497511fadb 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -653,7 +653,7 @@ struct io_unlink { struct io_completion { struct file *file; struct list_head list; - int cflags; + u32 cflags; }; struct io_async_connect { @@ -1476,7 +1476,8 @@ static bool io_cqring_overflow_flush(struct io_ring_ctx *ctx, bool force, return ret; } -static void __io_cqring_fill_event(struct io_kiocb *req, long res, long cflags) +static void __io_cqring_fill_event(struct io_kiocb *req, long res, + unsigned int cflags) { struct io_ring_ctx *ctx = req->ctx; struct io_uring_cqe *cqe; |