Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752155AbdI3GMr (ORCPT ); Sat, 30 Sep 2017 02:12:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60318 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751719AbdI3GMp (ORCPT ); Sat, 30 Sep 2017 02:12:45 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 348BE883A5 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=ming.lei@redhat.com From: Ming Lei To: Jens Axboe , linux-block@vger.kernel.org, Christoph Hellwig , linux-scsi@vger.kernel.org, "Martin K . Petersen" , "James E . J . Bottomley" Cc: Bart Van Assche , Oleksandr Natalenko , Johannes Thumshirn , Cathy Avery , Martin Steigerwald , linux-kernel@vger.kernel.org, Hannes Reinecke , Ming Lei , Bart Van Assche Subject: [PATCH V7 1/6] blk-mq: only run hw queues for blk-mq Date: Sat, 30 Sep 2017 14:12:09 +0800 Message-Id: <20170930061214.10622-2-ming.lei@redhat.com> In-Reply-To: <20170930061214.10622-1-ming.lei@redhat.com> References: <20170930061214.10622-1-ming.lei@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Sat, 30 Sep 2017 06:12:45 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 845 Lines: 27 This patch just makes it explicitely. Tested-by: Oleksandr Natalenko Tested-by: Martin Steigerwald Reviewed-by: Johannes Thumshirn Cc: Bart Van Assche Signed-off-by: Ming Lei --- block/blk-mq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 98a18609755e..6fd9f86fc86d 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -125,7 +125,8 @@ void blk_freeze_queue_start(struct request_queue *q) freeze_depth = atomic_inc_return(&q->mq_freeze_depth); if (freeze_depth == 1) { percpu_ref_kill(&q->q_usage_counter); - blk_mq_run_hw_queues(q, false); + if (q->mq_ops) + blk_mq_run_hw_queues(q, false); } } EXPORT_SYMBOL_GPL(blk_freeze_queue_start); -- 2.9.5