Skip to content

Commit 4c76de4

Browse files
isilenceaxboe
authored andcommitted
io_uring: open code __io_post_aux_cqe()
There is no reason to keep __io_post_aux_cqe() separately from io_post_aux_cqe(). Signed-off-by: Pavel Begunkov <[email protected]> Link: https://lore.kernel.org/r/2c4c1f68d694deea25a212fc09bbb11f330cd82e.1742829388.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <[email protected]>
1 parent 3afcb3b commit 4c76de4

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

io_uring/io_uring.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -834,24 +834,14 @@ static bool io_fill_cqe_aux(struct io_ring_ctx *ctx, u64 user_data, s32 res,
834834
return false;
835835
}
836836

837-
static bool __io_post_aux_cqe(struct io_ring_ctx *ctx, u64 user_data, s32 res,
838-
u32 cflags)
837+
bool io_post_aux_cqe(struct io_ring_ctx *ctx, u64 user_data, s32 res, u32 cflags)
839838
{
840839
bool filled;
841840

841+
io_cq_lock(ctx);
842842
filled = io_fill_cqe_aux(ctx, user_data, res, cflags);
843843
if (!filled)
844844
filled = io_cqring_event_overflow(ctx, user_data, res, cflags, 0, 0);
845-
846-
return filled;
847-
}
848-
849-
bool io_post_aux_cqe(struct io_ring_ctx *ctx, u64 user_data, s32 res, u32 cflags)
850-
{
851-
bool filled;
852-
853-
io_cq_lock(ctx);
854-
filled = __io_post_aux_cqe(ctx, user_data, res, cflags);
855845
io_cq_unlock_post(ctx);
856846
return filled;
857847
}

0 commit comments

Comments
 (0)