提交 a6d45dd0 编写于 作者: P Pavel Begunkov 提交者: Jens Axboe

io_uring: don't mark link's head for_async

No reason to mark a head of a link as for-async in io_req_defer_prep().
grab_env(), etc. That will be done further during submission if
neccessary.

Mark for_async=false saving extra grab_env() in many cases.
Signed-off-by: NPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 1bcb8c5d
......@@ -6092,7 +6092,7 @@ static int io_submit_sqe(struct io_kiocb *req, const struct io_uring_sqe *sqe,
if (io_alloc_async_ctx(req))
return -EAGAIN;
ret = io_req_defer_prep(req, sqe, true);
ret = io_req_defer_prep(req, sqe, false);
if (ret)
req->flags |= REQ_F_FAIL_LINK;
*link = req;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册