blob: 509e5d2137613d9fb82cbdfef5f0dfb3b9e2d114 [file] [log] [blame]
From faeb21cdf7d8bf66787315533f78e0d9fcd296fb Mon Sep 17 00:00:00 2001
From: Sasha Levin <sashal@kernel.org>
Date: Thu, 30 Jul 2020 18:43:48 +0300
Subject: io_uring: fix stalled deferred requests
From: Pavel Begunkov <asml.silence@gmail.com>
[ Upstream commit dd9dfcdf5a603680458f5e7b0d2273c66e5417db ]
Always do io_commit_cqring() after completing a request, even if it was
accounted as overflowed on the CQ side. Failing to do that may lead to
not to pushing deferred requests when needed, and so stalling the whole
ring.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/io_uring.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index c212af69c15b4..06a093da872f8 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -7581,6 +7581,7 @@ static void io_uring_cancel_files(struct io_ring_ctx *ctx,
}
WRITE_ONCE(ctx->rings->cq_overflow,
atomic_inc_return(&ctx->cached_cq_overflow));
+ io_commit_cqring(ctx);
spin_unlock_irq(&ctx->completion_lock);
/*
--
2.25.1