diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2023-01-23 15:37:16 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-01-29 23:17:41 +0100 |
commit | c8576f3e612d3c5b01d434ae296b9b76d7907708 (patch) | |
tree | e920d94aea33013acfab94c19eb47f591c409d5d /io_uring/notif.c | |
parent | io_uring: improve io_get_sqe (diff) | |
download | linux-c8576f3e612d3c5b01d434ae296b9b76d7907708.tar.xz linux-c8576f3e612d3c5b01d434ae296b9b76d7907708.zip |
io_uring: refactor req allocation
Follow the io_get_sqe pattern returning the result via a pointer
and hide request cache refill inside io_alloc_req().
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/8c37c2e8a3cb5e4cd6a8ae3b91371227a92708a6.1674484266.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/notif.c')
-rw-r--r-- | io_uring/notif.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/io_uring/notif.c b/io_uring/notif.c index c4bb793ebf0e..09dfd0832d19 100644 --- a/io_uring/notif.c +++ b/io_uring/notif.c @@ -68,9 +68,8 @@ struct io_kiocb *io_alloc_notif(struct io_ring_ctx *ctx) struct io_kiocb *notif; struct io_notif_data *nd; - if (unlikely(!io_alloc_req_refill(ctx))) + if (unlikely(!io_alloc_req(ctx, ¬if))) return NULL; - notif = io_alloc_req(ctx); notif->opcode = IORING_OP_NOP; notif->flags = 0; notif->file = NULL; |