diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-01-19 13:32:38 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-02-01 10:02:42 -0700 |
commit | ec30e04ba4a5c265f52482092a5f5f5232947c48 (patch) | |
tree | 710e335ea2876c57d77d4377ecf9d7c2d6792093 /fs/io_uring.c | |
parent | 2d7e935809b7f740442ce79fc6f53e94a1f0b874 (diff) | |
download | lwn-ec30e04ba4a5c265f52482092a5f5f5232947c48.tar.gz lwn-ec30e04ba4a5c265f52482092a5f5f5232947c48.zip |
io_uring: inline __io_commit_cqring()
Inline it in its only user, that's cleaner
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 6eb4c25fa18b..347bdcd2c0fe 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1364,14 +1364,6 @@ static bool req_need_defer(struct io_kiocb *req, u32 seq) 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) { if (req->work.identity == &tctx->__identity) @@ -1693,7 +1685,9 @@ static void io_flush_timeouts(struct io_ring_ctx *ctx) static void io_commit_cqring(struct io_ring_ctx *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))) __io_queue_deferred(ctx); |