l30013671 / rpms / kernel

Forked from rpms/kernel 2 years ago
Clone
50b28d
centosplus patch
50b28d
50b28d
Patch provided by RH in BZ#1671551
50b28d
50b28d
diff --git a/block/blk-mq.c b/block/blk-mq.c
50b28d
index 645b4f138a6c..8492e7ca4ef8 100644
50b28d
--- a/block/blk-mq.c
50b28d
+++ b/block/blk-mq.c
50b28d
@@ -76,6 +76,9 @@ static void blk_mq_check_inflight(struct blk_mq_hw_ctx *hctx,
50b28d
 {
50b28d
 	struct mq_inflight *mi = priv;
50b28d
 
50b28d
+	if (!blk_mq_request_started(rq))
50b28d
+		return;
50b28d
+
50b28d
 	/*
50b28d
 	 * index[0] counts the specific partition that was asked
50b28d
 	 * for. index[1] counts the ones that are active on the
50b28d
@@ -103,6 +106,9 @@ static void blk_mq_check_inflight_rw(struct blk_mq_hw_ctx *hctx,
50b28d
 {
50b28d
 	struct mq_inflight *mi = priv;
50b28d
 
50b28d
+	if (!blk_mq_request_started(rq))
50b28d
+		return;
50b28d
+
50b28d
 	if (rq->part == mi->part)
50b28d
 		mi->inflight[rq_data_dir(rq)]++;
50b28d
 }