Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1103720pxa; Thu, 20 Aug 2020 02:33:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzL4mmyiefc+yei2ZbhfuTMPD+eQNGuoKltU6iNHuR2MPhWSrrapIXiekzRdp6Ouk1uMqpA X-Received: by 2002:a05:6402:7d5:: with SMTP id u21mr2092581edy.341.1597916010297; Thu, 20 Aug 2020 02:33:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597916010; cv=none; d=google.com; s=arc-20160816; b=GxwDLknuEeHxAyfAs9A5tPtfiUdKuGM06gNCfj8+zNRh+F/ystYSOYomXKFbGfHSPl qv25oaIDgRL2FCnIpDilOZirT8+2zL/O80WBJ9pIlYdoIirOZXvmARhNmrLJ9whzduXC Kmptsa2yGFPzgRqTPI+3nYXPn/SjHRHyfFU0WIaK80nM5vrI794MeFxYWv//wgyrliPa WXCETXcLEKb+fmjkCohl+UR8XSP/5d0klmzKbQirBTlWRph2h2/TcQFoA4Z8x7sUzDjY ctC7dN7948lHgpooT2vfwKsJYn0t2NGhhWlWPPAG8XRg7rdb0/duWGeMFU7Sq5D171h+ l+5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6Ztoa2ucYyFERhoALIGOqjejTXhCk91ETs7q/Ku7PC4=; b=He9QK6pBf/sylSKRgiTX9S8+hhi5+L3THTd+jYd1ZOKYZ+qkwoVeCaBckxXLRrgN7o oCIJM/hVgJui8wxRkx0sO2AjxSlIVycFclpdLoq29BxzI5E60PLiHDINSq3rmKhK7Vob i11cz7NJzC6G0ntTgVOBcHV7LSBaQsGXYw7RBKtDKpoEiPPsc3TuLYtod/9lOCXt6XSI ytRTNJ8HiIkPImYOwdkjvX/7FHJ4yJj9sSPWFkg3dNPQUF47npx5xjCqb++pf/azkElP uMgQzR/YGzu5vK3FZ4FtIgjIGXgYAkpoMZBhzydDJEiS4tSfIYyUMkgxy4b5anEIpKZs +PyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GjYlkHjq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y5si784588eje.702.2020.08.20.02.33.06; Thu, 20 Aug 2020 02:33:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GjYlkHjq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728179AbgHTJao (ORCPT + 99 others); Thu, 20 Aug 2020 05:30:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:41544 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728169AbgHTJaa (ORCPT ); Thu, 20 Aug 2020 05:30:30 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D1FDE20855; Thu, 20 Aug 2020 09:30:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597915830; bh=vUMlRPXZX8LWcxjNTSMNJN5QyXqT7sG8LtdI37FiEJg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GjYlkHjqXdGJd7msDAHoN3DUSE8fAYDzdgIkBYVpjR8JdhpxQcK+I+x5nY6jXSLEB fwR6iCgNqMUm1aMaZc6Rhm/8UCrto3KvBCyON83H5DHvVUscJVHzSMndybc/EjgEKC 890j0+aRWwClrCh5Yep4Kbyg4mClPolAv82EUmwc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ming Lei , Mike Snitzer , Sasha Levin Subject: [PATCH 5.8 148/232] dm rq: dont call blk_mq_queue_stopped() in dm_stop_queue() Date: Thu, 20 Aug 2020 11:19:59 +0200 Message-Id: <20200820091619.981973887@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820091612.692383444@linuxfoundation.org> References: <20200820091612.692383444@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ming Lei [ Upstream commit e766668c6cd49d741cfb49eaeb38998ba34d27bc ] dm_stop_queue() only uses blk_mq_quiesce_queue() so it doesn't formally stop the blk-mq queue; therefore there is no point making the blk_mq_queue_stopped() check -- it will never be stopped. In addition, even though dm_stop_queue() actually tries to quiesce hw queues via blk_mq_quiesce_queue(), checking with blk_queue_quiesced() to avoid unnecessary queue quiesce isn't reliable because: the QUEUE_FLAG_QUIESCED flag is set before synchronize_rcu() and dm_stop_queue() may be called when synchronize_rcu() from another blk_mq_quiesce_queue() is in-progress. Fixes: 7b17c2f7292ba ("dm: Fix a race condition related to stopping and starting queues") Signed-off-by: Ming Lei Signed-off-by: Mike Snitzer Signed-off-by: Sasha Levin --- drivers/md/dm-rq.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c index 85e0daabad49c..20745e2e34b94 100644 --- a/drivers/md/dm-rq.c +++ b/drivers/md/dm-rq.c @@ -70,9 +70,6 @@ void dm_start_queue(struct request_queue *q) void dm_stop_queue(struct request_queue *q) { - if (blk_mq_queue_stopped(q)) - return; - blk_mq_quiesce_queue(q); } -- 2.25.1