diff options
author | Jens Axboe <axboe@kernel.dk> | 2022-07-07 19:18:33 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-07-25 02:39:17 +0200 |
commit | 9da7471ed10dab52410062be74896a6c0aa1bf3a (patch) | |
tree | 52bb433d30a8d6722c931e498c2c810fc917d2cd /io_uring/poll.c | |
parent | io_uring: consolidate hash_locked io-wq handling (diff) | |
download | linux-9da7471ed10dab52410062be74896a6c0aa1bf3a.tar.xz linux-9da7471ed10dab52410062be74896a6c0aa1bf3a.zip |
io_uring: move apoll cache to poll.c
This is where it's used, move the flush handler in there.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/poll.c')
-rw-r--r-- | io_uring/poll.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/io_uring/poll.c b/io_uring/poll.c index 76592063abe7..052fcb647208 100644 --- a/io_uring/poll.c +++ b/io_uring/poll.c @@ -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); + } +} |