summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2021-10-04 20:02:59 +0100
committerJens Axboe <axboe@kernel.dk>2021-10-19 05:49:55 -0600
commiteb6e6f0690c846f7de46181bab3954c12c96e11e (patch)
tree58ab9b648d80610a445f59449704e94e0c533da6
parent867f8fa5aeb7fa51290bf3567ce2bbc45580a469 (diff)
io_uring: inline io_poll_complete
Inline io_poll_complete(), it's simple and doesn't have any particular purpose. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/933d7ee3e4450749a2d892235462c8f18d030293.1633373302.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--fs/io_uring.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index dc83effa8317..815a7ec68dbc 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -5292,16 +5292,6 @@ static bool __io_poll_complete(struct io_kiocb *req, __poll_t mask)
return !(flags & IORING_CQE_F_MORE);
}
-static inline bool io_poll_complete(struct io_kiocb *req, __poll_t mask)
- __must_hold(&req->ctx->completion_lock)
-{
- bool done;
-
- done = __io_poll_complete(req, mask);
- io_commit_cqring(req->ctx);
- return done;
-}
-
static void io_poll_task_func(struct io_kiocb *req, bool *locked)
{
struct io_ring_ctx *ctx = req->ctx;
@@ -5791,7 +5781,8 @@ static int io_poll_add(struct io_kiocb *req, unsigned int issue_flags)
if (mask) { /* no async, we'd stolen it */
ipt.error = 0;
- done = io_poll_complete(req, mask);
+ done = __io_poll_complete(req, mask);
+ io_commit_cqring(req->ctx);
}
spin_unlock(&ctx->completion_lock);