Skip to content

Commit e84b01a

Browse files
committed
io_uring/poll: move poll execution helpers higher up
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>
1 parent c79f52f commit e84b01a

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

io_uring/poll.c

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,26 @@ enum {
228228
IOU_POLL_REISSUE = 3,
229229
};
230230

231+
static void __io_poll_execute(struct io_kiocb *req, int mask)
232+
{
233+
unsigned flags = 0;
234+
235+
io_req_set_res(req, mask, 0);
236+
req->io_task_work.func = io_poll_task_func;
237+
238+
trace_io_uring_task_add(req, mask);
239+
240+
if (!(req->flags & REQ_F_POLL_NO_LAZY))
241+
flags = IOU_F_TWQ_LAZY_WAKE;
242+
__io_req_task_work_add(req, flags);
243+
}
244+
245+
static inline void io_poll_execute(struct io_kiocb *req, int res)
246+
{
247+
if (io_poll_get_ownership(req))
248+
__io_poll_execute(req, res);
249+
}
250+
231251
/*
232252
* All poll tw should go through this. Checks for poll events, manages
233253
* references, does rewait, etc.
@@ -364,26 +384,6 @@ void io_poll_task_func(struct io_kiocb *req, struct io_tw_state *ts)
364384
}
365385
}
366386

367-
static void __io_poll_execute(struct io_kiocb *req, int mask)
368-
{
369-
unsigned flags = 0;
370-
371-
io_req_set_res(req, mask, 0);
372-
req->io_task_work.func = io_poll_task_func;
373-
374-
trace_io_uring_task_add(req, mask);
375-
376-
if (!(req->flags & REQ_F_POLL_NO_LAZY))
377-
flags = IOU_F_TWQ_LAZY_WAKE;
378-
__io_req_task_work_add(req, flags);
379-
}
380-
381-
static inline void io_poll_execute(struct io_kiocb *req, int res)
382-
{
383-
if (io_poll_get_ownership(req))
384-
__io_poll_execute(req, res);
385-
}
386-
387387
static void io_poll_cancel_req(struct io_kiocb *req)
388388
{
389389
io_poll_mark_cancelled(req);

0 commit comments

Comments
 (0)