diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-01-29 21:52:54 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-02-16 21:10:56 +0300 |
commit | 0848bf7e539aa33975c4a216444139532e4b526a (patch) | |
tree | 8aa1b641b813e84dcba07857214a0a68a623ede6 /io_uring/poll.c | |
parent | 0ceb7a9230d662633afe6b748bdbd4ba3d3c6328 (diff) | |
download | linux-0848bf7e539aa33975c4a216444139532e4b526a.tar.xz |
io_uring/poll: move poll execution helpers higher up
Commit e84b01a880f635e3084a361afba41f95ff500d12 upstream.
In preparation for calling __io_poll_execute() higher up, move the
functions to avoid forward declarations.
No functional changes in this patch.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'io_uring/poll.c')
-rw-r--r-- | io_uring/poll.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/io_uring/poll.c b/io_uring/poll.c index 4c360ba8793a..b0bc78526394 100644 --- a/io_uring/poll.c +++ b/io_uring/poll.c @@ -228,6 +228,21 @@ enum { IOU_POLL_REISSUE = 3, }; +static void __io_poll_execute(struct io_kiocb *req, int mask) +{ + io_req_set_res(req, mask, 0); + req->io_task_work.func = io_poll_task_func; + + trace_io_uring_task_add(req, mask); + io_req_task_work_add(req); +} + +static inline void io_poll_execute(struct io_kiocb *req, int res) +{ + if (io_poll_get_ownership(req)) + __io_poll_execute(req, res); +} + /* * All poll tw should go through this. Checks for poll events, manages * references, does rewait, etc. @@ -364,21 +379,6 @@ void io_poll_task_func(struct io_kiocb *req, struct io_tw_state *ts) } } -static void __io_poll_execute(struct io_kiocb *req, int mask) -{ - io_req_set_res(req, mask, 0); - req->io_task_work.func = io_poll_task_func; - - trace_io_uring_task_add(req, mask); - io_req_task_work_add(req); -} - -static inline void io_poll_execute(struct io_kiocb *req, int res) -{ - if (io_poll_get_ownership(req)) - __io_poll_execute(req, res); -} - static void io_poll_cancel_req(struct io_kiocb *req) { io_poll_mark_cancelled(req); |