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: Pavel Begunkov <asml.silence@xxxxxxxxx> --- fs/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/io_uring.c b/fs/io_uring.c index 454381c19d25..a4c94dc7edc8 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -5212,7 +5212,7 @@ static bool io_poll_remove_one(struct io_kiocb *req) /* non-poll requests have submit ref still */ do_complete = __io_poll_remove_one(req, &apoll->poll); if (do_complete) { - io_put_req(req); + req_ref_put(req); kfree(apoll->double_poll); kfree(apoll); } -- 2.24.0