@@ -1227,15 +1227,18 @@ int io_run_local_work(struct io_ring_ctx *ctx)
return ret;
}
-static void io_req_tw_post(struct io_kiocb *req, bool *locked)
+void io_req_task_complete(struct io_kiocb *req, bool *locked)
{
- io_req_complete_post(req);
+ if (*locked)
+ io_req_complete_defer(req);
+ else
+ io_req_complete_post(req);
}
void io_req_tw_post_queue(struct io_kiocb *req, s32 res, u32 cflags)
{
io_req_set_res(req, res, cflags);
- req->io_task_work.func = io_req_tw_post;
+ req->io_task_work.func = io_req_task_complete;
io_req_task_work_add(req);
}
@@ -1464,14 +1467,6 @@ static int io_iopoll_check(struct io_ring_ctx *ctx, long min)
return ret;
}
-void io_req_task_complete(struct io_kiocb *req, bool *locked)
-{
- if (*locked)
- io_req_complete_defer(req);
- else
- io_req_complete_post(req);
-}
-
/*
* After the iocb has been issued, it's safe to be found on the poll list.
* Adding the kiocb to the list AFTER submission ensures that we don't
Merge these functions that have the same logic Signed-off-by: Dylan Yudaken <dylany@meta.com> --- io_uring/io_uring.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-)