static void __io_queue_sqe(struct io_kiocb *req, const struct io_uring_sqe *sqe)
{
	struct io_kiocb *linked_timeout;
	struct io_kiocb *nxt = NULL;
	int ret;

again:
	linked_timeout = io_prep_linked_timeout(req);

	ret = io_issue_sqe(req, sqe, &nxt, true);

	/*
	 * We async punt it if the file wasn't marked NOWAIT, or if the file
	 * doesn't support non-blocking read/write attempts
	 */
	if (ret == -EAGAIN && (!(req->flags & REQ_F_NOWAIT) ||
	    (req->flags & REQ_F_MUST_PUNT))) {
punt:
		if (io_op_defs[req->opcode].file_table) {
			ret = io_grab_files(req);
			if (ret)
				goto err;
		}

		/*
		 * Queued up for async execution, worker will release
		 * submit reference when the iocb is actually submitted.
		 */
		io_queue_async_work(req);
		goto done_req;
	}

err:
	/* drop submission reference */
	io_put_req(req);

	if (linked_timeout) {
		if (!ret)
			io_queue_linked_timeout(linked_timeout);
		else
			io_put_req(linked_timeout);
	}

	/* and drop final reference, if we failed */
	if (ret) {
		io_cqring_add_event(req, ret);
		req_set_fail_links(req);
		io_put_req(req);
	}
done_req:
	if (nxt) {
		req = nxt;
		nxt = NULL;

		if (req->flags & REQ_F_FORCE_ASYNC)
			goto punt;
		goto again;
	}
}
static void __io_queue_sqe(struct io_kiocb *req, const struct io_uring_sqe *sqe)
{
	struct io_kiocb *linked_timeout;
	struct io_kiocb *nxt = NULL;
	int ret;

again:
	linked_timeout = io_prep_linked_timeout(req);

	ret = io_issue_sqe(req, sqe, &nxt, true);

	 
	if (ret == -EAGAIN && (!(req->flags & REQ_F_NOWAIT) ||
	    (req->flags & REQ_F_MUST_PUNT))) {
punt:
		if (io_op_defs[req->opcode].file_table) {
			ret = io_grab_files(req);
			if (ret)
				goto err;
		}

		 
		io_queue_async_work(req);
		goto done_req;
	}

err:
	 
	io_put_req(req);

	if (linked_timeout) {
		if (!ret)
			io_queue_linked_timeout(linked_timeout);
		else
			io_put_req(linked_timeout);
	}

	 
	if (ret) {
		io_cqring_add_event(req, ret);
		req_set_fail_links(req);
		io_put_req(req);
	}
done_req:
	if (nxt) {
		req = nxt;
		nxt = NULL;

		if (req->flags & REQ_F_FORCE_ASYNC)
			goto punt;
		goto again;
	}
}