diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2023-08-11 14:53:43 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-08-11 18:42:57 +0200 |
commit | 00b0db562485fbb259cd4054346208ad0885d662 (patch) | |
tree | 54c04cc1c7a58c451a78bf3c640dcb93e4ddf899 /io_uring/io_uring.c | |
parent | io_uring/net: don't overflow multishot recv (diff) | |
download | linux-00b0db562485fbb259cd4054346208ad0885d662.tar.xz linux-00b0db562485fbb259cd4054346208ad0885d662.zip |
io_uring: open code io_fill_cqe_req()
io_fill_cqe_req() is only called from one place, open code it, and
rename __io_fill_cqe_req().
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/f432ce75bb1c94cadf0bd2add4d6aa510bd1fb36.1691757663.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/io_uring.c')
-rw-r--r-- | io_uring/io_uring.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 047576bc98d0..e969b4ca1c47 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -978,8 +978,10 @@ static void __io_req_complete_post(struct io_kiocb *req, unsigned issue_flags) struct io_rsrc_node *rsrc_node = NULL; io_cq_lock(ctx); - if (!(req->flags & REQ_F_CQE_SKIP)) - io_fill_cqe_req(ctx, req); + if (!(req->flags & REQ_F_CQE_SKIP)) { + if (!io_fill_cqe_req(ctx, req)) + io_req_cqe_overflow(req); + } /* * If we're the last reference to this request, add to our locked @@ -1556,7 +1558,7 @@ static void __io_submit_flush_completions(struct io_ring_ctx *ctx) comp_list); if (!(req->flags & REQ_F_CQE_SKIP) && - unlikely(!__io_fill_cqe_req(ctx, req))) { + unlikely(!io_fill_cqe_req(ctx, req))) { if (ctx->task_complete) { spin_lock(&ctx->completion_lock); io_req_cqe_overflow(req); |