Lines Matching refs:ctx
65 if (req->ctx->compat)
88 struct io_ring_ctx *ctx = req->ctx;
91 if (unlikely(req->buf_index >= ctx->nr_user_bufs))
93 index = array_index_nospec(req->buf_index, ctx->nr_user_bufs);
94 req->imu = ctx->user_bufs[index];
95 io_req_set_rsrc_node(req, ctx, 0);
191 struct io_ring_ctx *ctx = req->ctx;
196 !(ctx->flags & IORING_SETUP_IOPOLL)))
203 if (percpu_ref_is_dying(&ctx->refs))
409 req->ctx->compat);
673 struct io_ring_ctx *ctx = req->ctx;
698 if (ctx->flags & IORING_SETUP_IOPOLL) {
787 if (!force_nonblock && !(req->ctx->flags & IORING_SETUP_IOPOLL))
943 if (ret2 == -EAGAIN && (req->ctx->flags & IORING_SETUP_IOPOLL))
949 trace_io_uring_short_write(req->ctx, kiocb->ki_pos - ret2,
995 int io_do_iopoll(struct io_ring_ctx *ctx, bool force_nonspin)
1006 if (ctx->poll_multi_queue || force_nonspin)
1009 wq_list_for_each(pos, start, &ctx->iopoll_list) {
1062 pos = start ? start->next : ctx->iopoll_list.first;
1063 wq_list_cut(&ctx->iopoll_list, prev, start);
1065 if (WARN_ON_ONCE(!wq_list_empty(&ctx->submit_state.compl_reqs)))
1067 ctx->submit_state.compl_reqs.first = pos;
1068 __io_submit_flush_completions(ctx);