Lines Matching defs:link
414 if (WARN_ON_ONCE(!req->link))
422 __io_req_set_refcount(req->link, 2);
423 return req->link;
497 struct io_kiocb *link = io_prep_linked_timeout(req);
503 /* init ->work of the whole link before punting */
518 if (link)
519 io_queue_linked_timeout(link);
988 if (req->link) {
989 io_req_task_queue(req->link);
990 req->link = NULL;
1055 req->link = NULL;
1149 nxt = req->link;
1150 req->link = NULL;
2104 struct io_kiocb *head = ctx->submit_state.link.head;
2109 * If we need to drain a request in the middle of a link, drain
2110 * the head request and the next request/link after the current
2111 * link. Considering sequential execution of links,
2113 * link.
2166 /* if there is no link, we're at "next" request and need to drain */
2167 if (unlikely(ctx->drain_next) && !ctx->submit_state.link.head) {
2218 struct io_submit_link *link = &ctx->submit_state.link;
2219 struct io_kiocb *head = link->head;
2225 * unusable. Instead of failing eagerly, continue assembling the link if
2226 * applicable and mark the head with REQ_F_FAIL. The link flushing code
2235 link->last->link = req;
2236 link->head = NULL;
2244 link->last->link = req;
2246 link->head = req;
2247 link->last = req;
2255 struct io_submit_link *link = &ctx->submit_state.link;
2271 if (unlikely(link->head)) {
2276 trace_io_uring_link(req, link->head);
2277 link->last->link = req;
2278 link->last = req;
2282 /* last request of the link, flush it */
2283 req = link->head;
2284 link->head = NULL;
2291 link->head = req;
2292 link->last = req;
2311 if (unlikely(state->link.head))
2312 io_queue_sqe_fallback(state->link.head);
2329 state->link.head = NULL;