Lines Matching refs:link
309 struct io_submit_link link; member
888 struct io_kiocb *link; member
1148 for (pos = (head); pos; pos = pos->link)
1423 if (WARN_ON_ONCE(!req->link)) in __io_prep_linked_timeout()
1431 __io_req_set_refcount(req->link, 2); in __io_prep_linked_timeout()
1432 return req->link; in __io_prep_linked_timeout()
1486 struct io_kiocb *link = io_prep_linked_timeout(req); in io_queue_async_work() local
1511 if (link) in io_queue_async_work()
1512 io_queue_linked_timeout(link); in io_queue_async_work()
1867 if (req->link) { in io_req_complete_post()
1868 io_req_task_queue(req->link); in io_req_complete_post()
1869 req->link = NULL; in io_req_complete_post()
1942 req->link = NULL; in io_preinit_req()
2065 struct io_kiocb *nxt = req->link; in io_remove_next_linked()
2067 req->link = nxt->link; in io_remove_next_linked()
2068 nxt->link = NULL; in io_remove_next_linked()
2075 struct io_kiocb *link = req->link; in io_kill_linked_timeout() local
2077 if (link && link->opcode == IORING_OP_LINK_TIMEOUT) { in io_kill_linked_timeout()
2078 struct io_timeout_data *io = link->async_data; in io_kill_linked_timeout()
2081 link->timeout.head = NULL; in io_kill_linked_timeout()
2083 list_del(&link->timeout.list); in io_kill_linked_timeout()
2084 io_fill_cqe_req(link, -ECANCELED, 0); in io_kill_linked_timeout()
2085 io_put_req_deferred(link); in io_kill_linked_timeout()
2095 struct io_kiocb *nxt, *link = req->link; in io_fail_links() local
2097 req->link = NULL; in io_fail_links()
2098 while (link) { in io_fail_links()
2101 if (link->flags & REQ_F_FAIL) in io_fail_links()
2102 res = link->result; in io_fail_links()
2104 nxt = link->link; in io_fail_links()
2105 link->link = NULL; in io_fail_links()
2107 trace_io_uring_fail_link(req, link); in io_fail_links()
2108 io_fill_cqe_req(link, res, 0); in io_fail_links()
2109 io_put_req_deferred(link); in io_fail_links()
2110 link = nxt; in io_fail_links()
2120 struct io_kiocb *link = req->link; in io_disarm_next() local
2123 if (link && link->opcode == IORING_OP_LINK_TIMEOUT) { in io_disarm_next()
2125 io_fill_cqe_req(link, -ECANCELED, 0); in io_disarm_next()
2126 io_put_req_deferred(link); in io_disarm_next()
2138 posted |= (req->link != NULL); in io_disarm_next()
2166 nxt = req->link; in __io_req_find_next()
2167 req->link = NULL; in __io_req_find_next()
6292 struct io_submit_link *link = &req->ctx->submit_state.link; in io_timeout_prep() local
6294 if (!link->head) in io_timeout_prep()
6296 if (link->last->opcode == IORING_OP_LINK_TIMEOUT) in io_timeout_prep()
6298 req->timeout.head = link->last; in io_timeout_prep()
6299 link->last->flags |= REQ_F_ARM_LTIMEOUT; in io_timeout_prep()
6638 io_for_each_link(pos, req->link) { in io_drain_req()
7241 struct io_submit_link *link = &ctx->submit_state.link; in io_submit_sqe() local
7248 if (link->head) { in io_submit_sqe()
7258 if (!(link->head->flags & REQ_F_FAIL)) in io_submit_sqe()
7259 req_fail_link_node(link->head, -ECANCELED); in io_submit_sqe()
7287 if (link->head) { in io_submit_sqe()
7288 struct io_kiocb *head = link->head; in io_submit_sqe()
7299 link->last->link = req; in io_submit_sqe()
7300 link->last = req; in io_submit_sqe()
7304 link->head = NULL; in io_submit_sqe()
7309 link->head = req; in io_submit_sqe()
7310 link->last = req; in io_submit_sqe()
7325 if (state->link.head) in io_submit_state_end()
7326 io_queue_sqe(state->link.head); in io_submit_state_end()
7342 state->link.head = NULL; in io_submit_state_start()