Commit 8c3f9cd1 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe
Browse files

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: default avatarPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 9fb8cb49
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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;