Skip to content

Commit 383cf89

Browse files
committed
treat CQE as read-only; don't clear user_data
1 parent 4730776 commit 383cf89

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Sources/CIORingShims/CQHandler.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ static void invoke_cqe_block(struct io_uring_cqe *cqe) {
2727
auto block = reinterpret_cast<io_uring_cqe_block>(io_uring_cqe_get_data(cqe));
2828
assert(block != nullptr);
2929
block(cqe);
30-
if ((cqe->flags & IORING_CQE_F_MORE) == 0) {
30+
if ((cqe->flags & IORING_CQE_F_MORE) == 0)
3131
_Block_release(block);
32-
cqe->user_data = 0; // assert fail on double fire
33-
}
3432
}
3533

3634
int io_uring_cq_handler(struct io_uring *ring) {

0 commit comments

Comments
 (0)