diff --git a/block/blk-mq.c b/block/blk-mq.c index a2e20b39a6ad9b974533dcf2fbf3f2a143419cff..cf03ee7a17aec5c84094a9eb3f4c94cc3c0c7c2a 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -106,7 +106,7 @@ static void blk_mq_check_inflight(struct blk_mq_hw_ctx *hctx, */ if (rq->part == mi->part) mi->inflight[0]++; - if (mi->part->partno) + if (rq->part && mi->part->partno) mi->inflight[1]++; }