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

io_uring: better ref handling in poll_remove_one

Instead of io_put_req() to drop not a final ref, use req_ref_put(),
which is slimmer and will also check the invariant.
Signed-off-by: NPavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/85b5774ce13ae55cc2e705abdc8cbafe1212f1bd.1617287883.git.asml.silence@gmail.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
上级 89b5066e
......@@ -5244,7 +5244,7 @@ static bool io_poll_remove_waitqs(struct io_kiocb *req)
/* non-poll requests have submit ref still */
do_complete = __io_poll_remove_one(req, &apoll->poll, true);
if (do_complete) {
io_put_req(req);
req_ref_put(req);
kfree(apoll->double_poll);
kfree(apoll);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册