]> git.itanic.dy.fi Git - linux-stable/commitdiff
io_uring: inline io_poll_complete
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 29 Aug 2022 13:30:17 +0000 (14:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:30:05 +0000 (10:30 +0200)
[ upstream commmit eb6e6f0690c846f7de46181bab3954c12c96e11e ]

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>
[pavel: backport]
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c

index 2b3392457770426a66c493ec1ca1200711e059b6..8b8af5a3c773eb14f2ceb6509d825aa1252fd4d4 100644 (file)
@@ -5447,16 +5447,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;
@@ -5910,7 +5900,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);