Skip to content

Commit 5288b9e

Browse files
isilenceaxboe
authored andcommitted
io_uring: open code io_req_cqe_overflow()
A preparation patch, just open code io_req_cqe_overflow(). Signed-off-by: Pavel Begunkov <[email protected]> Reviewed-by: Caleb Sander Mateos <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 1625664 commit 5288b9e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

io_uring/io_uring.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -739,14 +739,6 @@ static bool io_cqring_event_overflow(struct io_ring_ctx *ctx, u64 user_data,
739739
return true;
740740
}
741741

742-
static void io_req_cqe_overflow(struct io_kiocb *req)
743-
{
744-
io_cqring_event_overflow(req->ctx, req->cqe.user_data,
745-
req->cqe.res, req->cqe.flags,
746-
req->big_cqe.extra1, req->big_cqe.extra2);
747-
memset(&req->big_cqe, 0, sizeof(req->big_cqe));
748-
}
749-
750742
/*
751743
* writes to the cq entry need to come after reading head; the
752744
* control dependency is enough as we're using WRITE_ONCE to
@@ -1435,11 +1427,19 @@ void __io_submit_flush_completions(struct io_ring_ctx *ctx)
14351427
unlikely(!io_fill_cqe_req(ctx, req))) {
14361428
if (ctx->lockless_cq) {
14371429
spin_lock(&ctx->completion_lock);
1438-
io_req_cqe_overflow(req);
1430+
io_cqring_event_overflow(req->ctx, req->cqe.user_data,
1431+
req->cqe.res, req->cqe.flags,
1432+
req->big_cqe.extra1,
1433+
req->big_cqe.extra2);
14391434
spin_unlock(&ctx->completion_lock);
14401435
} else {
1441-
io_req_cqe_overflow(req);
1436+
io_cqring_event_overflow(req->ctx, req->cqe.user_data,
1437+
req->cqe.res, req->cqe.flags,
1438+
req->big_cqe.extra1,
1439+
req->big_cqe.extra2);
14421440
}
1441+
1442+
memset(&req->big_cqe, 0, sizeof(req->big_cqe));
14431443
}
14441444
}
14451445
__io_cq_unlock_post(ctx);

0 commit comments

Comments
 (0)