]> git.baikalelectronics.ru Git - kernel.git/commitdiff
io_uring: move apoll cache to poll.c
authorJens Axboe <axboe@kernel.dk>
Thu, 7 Jul 2022 17:18:33 +0000 (11:18 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jul 2022 00:39:17 +0000 (18:39 -0600)
This is where it's used, move the flush handler in there.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c
io_uring/poll.c
io_uring/poll.h

index caf979cd432729eefd3be6d0eb771428c84b6770..4d1ce58b015e19c97c527765b321019772e52a0a 100644 (file)
@@ -2445,18 +2445,6 @@ static void io_req_caches_free(struct io_ring_ctx *ctx)
        mutex_unlock(&ctx->uring_lock);
 }
 
-static void io_flush_apoll_cache(struct io_ring_ctx *ctx)
-{
-       struct async_poll *apoll;
-
-       while (!list_empty(&ctx->apoll_cache)) {
-               apoll = list_first_entry(&ctx->apoll_cache, struct async_poll,
-                                               poll.wait.entry);
-               list_del(&apoll->poll.wait.entry);
-               kfree(apoll);
-       }
-}
-
 static __cold void io_ring_ctx_free(struct io_ring_ctx *ctx)
 {
        io_sq_thread_finish(ctx);
index 76592063abe7ba27e0d8db564976f0c320844c66..052fcb6472083ae00e0ca2140416845ce789b3cf 100644 (file)
@@ -959,3 +959,15 @@ out:
        io_req_set_res(req, ret, 0);
        return IOU_OK;
 }
+
+void io_flush_apoll_cache(struct io_ring_ctx *ctx)
+{
+       struct async_poll *apoll;
+
+       while (!list_empty(&ctx->apoll_cache)) {
+               apoll = list_first_entry(&ctx->apoll_cache, struct async_poll,
+                                               poll.wait.entry);
+               list_del(&apoll->poll.wait.entry);
+               kfree(apoll);
+       }
+}
index c40673d7da01992d051c7df140b11f91990120fb..95f192c7babbd5235c16b26be603559c708fc549 100644 (file)
@@ -30,3 +30,5 @@ int io_poll_cancel(struct io_ring_ctx *ctx, struct io_cancel_data *cd,
 int io_arm_poll_handler(struct io_kiocb *req, unsigned issue_flags);
 bool io_poll_remove_all(struct io_ring_ctx *ctx, struct task_struct *tsk,
                        bool cancel_all);
+
+void io_flush_apoll_cache(struct io_ring_ctx *ctx);