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 9ebdd288653f..bf3eeabda71d 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -5224,7 +5224,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); } -- 2.24.0