author: Ming Lei <ming.lei@redhat.com> 2021-05-11 23:22:33 +0800
committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2021-07-14 17:06:50 +0200
commit: 9ec73d75f8c6a3ff4ce7dccca2c201aad755934d
parent: 25adea16787053aeb754293a6434b8a9a73a452b
Commit Summary:
Diffstat:
1 file changed, 1 insertion, 2 deletions
diff --git a/block/blk-flush.c b/block/blk-flush.c
index 7942ca6ed321..1002f6c58181 100644
--- a/block/blk-flush.c
+++ b/block/blk-flush.c
@@ -219,8 +219,6 @@ static void flush_end_io(struct request *flush_rq, blk_status_t error)
unsigned long flags = 0;
struct blk_flush_queue *fq = blk_get_flush_queue(q, flush_rq->mq_ctx);
- blk_account_io_flush(flush_rq);
-
/* release the tag's ownership to the req cloned from */
spin_lock_irqsave(&fq->mq_flush_lock, flags);
@@ -230,6 +228,7 @@ static void flush_end_io(struct request *flush_rq, blk_status_t error)
return;
}
+ blk_account_io_flush(flush_rq);
/*
* Flush request has to be marked as IDLE when it is really ended
* because its .end_io() is called from timeout code path too for