提交 d67d819a 编写于 作者: P Pavel Begunkov 提交者: Cheng Jian

io_uring: simplify io_req_link_next()

mainline inclusion
from mainline-5.5-rc1
commit b18fdf71
category: feature
bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=27
CVE: NA
---------------------------

"if (nxt)" is always true, as it was checked in the while's condition.
io_wq_current_is_worker() is unnecessary, as non-async callers don't
pass nxt, so io_queue_async_work() will be called for them anyway.
Signed-off-by: NPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
Signed-off-by: NZhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Nyangerkun <yangerkun@huawei.com>
Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: NCheng Jian <cj.chengjian@huawei.com>
上级 bf5b48ee
......@@ -902,16 +902,7 @@ static void io_req_link_next(struct io_kiocb *req, struct io_kiocb **nxtptr)
nxt->flags |= REQ_F_LINK;
}
/*
* If we're in async work, we can continue processing the chain
* in this context instead of having to queue up new async work.
*/
if (nxt) {
if (io_wq_current_is_worker())
*nxtptr = nxt;
else
io_queue_async_work(nxt);
}
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册