public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH] io_uring: fix duplicated increase of cached_cq_overflow
@ 2019-11-15  9:37 Bob Liu
  2019-11-15  9:49 ` Pavel Begunkov
  0 siblings, 1 reply; 6+ messages in thread
From: Bob Liu @ 2019-11-15  9:37 UTC (permalink / raw)
  To: axboe; +Cc: io-uring, Bob Liu

cached_cq_overflow already be increased in function
io_cqring_overflow_flush().

Signed-off-by: Bob Liu <[email protected]>
---
 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 55f8b1d..eb23451 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -701,7 +701,7 @@ static void io_cqring_fill_event(struct io_kiocb *req, long res)
 		WRITE_ONCE(cqe->flags, 0);
 	} else if (ctx->cq_overflow_flushed) {
 		WRITE_ONCE(ctx->rings->cq_overflow,
-				atomic_inc_return(&ctx->cached_cq_overflow));
+				atomic_read(&ctx->cached_cq_overflow));
 	} else {
 		refcount_inc(&req->refs);
 		req->result = res;
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-11-15 16:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-15  9:37 [PATCH] io_uring: fix duplicated increase of cached_cq_overflow Bob Liu
2019-11-15  9:49 ` Pavel Begunkov
2019-11-15 12:17   ` Bob Liu
2019-11-15 12:41     ` Pavel Begunkov
2019-11-15 13:10       ` Bob Liu
2019-11-15 16:35         ` Pavel Begunkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox