Commit ec30e04b authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe

io_uring: inline __io_commit_cqring()

Inline it in its only user, that's cleaner
Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 2d7e9358
...@@ -1364,14 +1364,6 @@ static bool req_need_defer(struct io_kiocb *req, u32 seq) ...@@ -1364,14 +1364,6 @@ static bool req_need_defer(struct io_kiocb *req, u32 seq)
return false; return false;
} }
static void __io_commit_cqring(struct io_ring_ctx *ctx)
{
struct io_rings *rings = ctx->rings;
/* order cqe stores with ring update */
smp_store_release(&rings->cq.tail, ctx->cached_cq_tail);
}
static void io_put_identity(struct io_uring_task *tctx, struct io_kiocb *req) static void io_put_identity(struct io_uring_task *tctx, struct io_kiocb *req)
{ {
if (req->work.identity == &tctx->__identity) if (req->work.identity == &tctx->__identity)
...@@ -1693,7 +1685,9 @@ static void io_flush_timeouts(struct io_ring_ctx *ctx) ...@@ -1693,7 +1685,9 @@ static void io_flush_timeouts(struct io_ring_ctx *ctx)
static void io_commit_cqring(struct io_ring_ctx *ctx) static void io_commit_cqring(struct io_ring_ctx *ctx)
{ {
io_flush_timeouts(ctx); io_flush_timeouts(ctx);
__io_commit_cqring(ctx);
/* order cqe stores with ring update */
smp_store_release(&ctx->rings->cq.tail, ctx->cached_cq_tail);
if (unlikely(!list_empty(&ctx->defer_list))) if (unlikely(!list_empty(&ctx->defer_list)))
__io_queue_deferred(ctx); __io_queue_deferred(ctx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment