提交 15e6a300 编写于 作者: P Pavel Begunkov 提交者: Xiaoguang Wang

io_uring: clean io_poll_complete

to #28170604

commit b0a20349f212dc725f5ddfd060e426fe6181d9c5 upstream

Deduplicate call to io_cqring_fill_event(), plain and easy
Signed-off-by: NPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
Acked-by: NJoseph Qi <joseph.qi@linux.alibaba.com>
Signed-off-by: NXiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
上级 a3e58e00
...@@ -3650,10 +3650,7 @@ static void io_poll_complete(struct io_kiocb *req, __poll_t mask, int error) ...@@ -3650,10 +3650,7 @@ static void io_poll_complete(struct io_kiocb *req, __poll_t mask, int error)
struct io_ring_ctx *ctx = req->ctx; struct io_ring_ctx *ctx = req->ctx;
req->poll.done = true; req->poll.done = true;
if (error) io_cqring_fill_event(req, error ? error : mangle_poll(mask));
io_cqring_fill_event(req, error);
else
io_cqring_fill_event(req, mangle_poll(mask));
io_commit_cqring(ctx); io_commit_cqring(ctx);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册