Message ID | 20200702135857.2827982-1-ming.lei@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | blk-mq: avoid to account active request repeatedly | expand |
diff --git a/block/blk-mq.c b/block/blk-mq.c index 6b36969220c1..656d92de9814 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1149,7 +1149,8 @@ static bool blk_mq_get_driver_tag(struct request *rq) if (rq->tag == BLK_MQ_NO_TAG && !__blk_mq_get_driver_tag(rq)) return false; - if (hctx->flags & BLK_MQ_F_TAG_SHARED) { + if ((hctx->flags & BLK_MQ_F_TAG_SHARED) && + !(rq->rq_flags & RQF_MQ_INFLIGHT)) { rq->rq_flags |= RQF_MQ_INFLIGHT; atomic_inc(&hctx->nr_active); }