Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp646723pxb; Tue, 2 Feb 2021 14:15:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJz76BcQvPUa/ZQ2OCr2oDOfUOgZMRBTxndJSZUYESe/nrk7WxiVi3blRABufDGQ3u+wBqFN X-Received: by 2002:a17:906:30cd:: with SMTP id b13mr144567ejb.336.1612304130491; Tue, 02 Feb 2021 14:15:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612304130; cv=none; d=google.com; s=arc-20160816; b=bsNkPMuxIVX2hOs99roUasJ2mjgtmiLDn/Sc4py4csesDe2EWSESm2SFQNGXw8mBU/ iadnyeWAAf7SKg57KEwUYjOMQhFFARcE0OKV4CKApwp0YYpVrOKyci9srvbb5rvvuxZt XpSHzHQ1gV1jJHsHQ+7hZ+RugaJtgznhNndd9QoanxKGEDyRwrJpl+NIOpppsMc+b895 qIHtHtF7S+b1FjTSvTP+JqWa2XwrjR1cfl1HYPaFy1kbBcoqcKQC4As/B9RnkAY9EWR3 mql8piOu5sx6XWJZcbKzlV/shqeDVnfMI3pP7O4rFlMYcBqJ/LnEHY5ofPSA8pl3Txh4 Tjkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YYiSwfy/A7Av7eR2dq16Non4PMf+FWD4xpX9zO1ZIK0=; b=UmC/A74nJhx/UTDFsXtmW4h69eMbTVho/cx9a8Dh8ZVqDd+MkV2CJDqoSjyFYV52Dj buGW7D2NnuGR0a/cRPnfgzfOo1ZWjXQPuAb9dQUZKWCfW7Zj/YEAuErDvJU2Xs3EuKpW LVd00fcq8ohnEhukzPx9IwxRhJD3BaqRj9+wWQQA9VuA4ikPAGJAHC/uveqWx8g+tRwy LQIS7so/Y3E/yMAuFGalIzp5F1dxh8LjBCcFossgBcYel3yRzW0kmanhIX1nasYCICb5 j9wIqgmB+t5MmbiIcnD4kRMWJG54AhrBz/tPWUyriEKENVxj6I3O/QcfXIro6J2XE/M5 BzWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=i5n5NS6K; 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=pass (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 e17si45064eds.259.2021.02.02.14.15.03; Tue, 02 Feb 2021 14:15:30 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=i5n5NS6K; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232855AbhBBNzr (ORCPT + 99 others); Tue, 2 Feb 2021 08:55:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:37906 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232879AbhBBNst (ORCPT ); Tue, 2 Feb 2021 08:48:49 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8D4B064FA2; Tue, 2 Feb 2021 13:42:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612273341; bh=ActQgV3OQ5VJ/hCb9T67xDjl9gG3cIAZxibIxThTSpk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i5n5NS6KpjsHZ9uqXYBw035QAPrCgVlxmPtY6DYKeW/thViRmzneOuusQQ5QDI+wx 2OEubBdgm7FJ4JrjvPgQq4zeZe6tXaL600cneracNSHbfWuwWmK7VD/3unFGJFNQTv U9IfzDG9ZiLJOgAWwPwAv2xbu2aFVJTwk5FKDS8Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, John Garry , Kashyap Desai , Ming Lei , Jens Axboe Subject: [PATCH 5.10 069/142] blk-mq: test QUEUE_FLAG_HCTX_ACTIVE for sbitmap_shared in hctx_may_queue Date: Tue, 2 Feb 2021 14:37:12 +0100 Message-Id: <20210202133000.570728868@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210202132957.692094111@linuxfoundation.org> References: <20210202132957.692094111@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ming Lei commit 2569063c7140c65a0d0ad075e95ddfbcda9ba3c0 upstream. In case of blk_mq_is_sbitmap_shared(), we should test QUEUE_FLAG_HCTX_ACTIVE against q->queue_flags instead of BLK_MQ_S_TAG_ACTIVE. So fix it. Cc: John Garry Cc: Kashyap Desai Fixes: f1b49fdc1c64 ("blk-mq: Record active_queues_shared_sbitmap per tag_set for when using shared sbitmap") Signed-off-by: Ming Lei Reviewed-by: John Garry Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- block/blk-mq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/block/blk-mq.h +++ b/block/blk-mq.h @@ -303,7 +303,7 @@ static inline bool hctx_may_queue(struct struct request_queue *q = hctx->queue; struct blk_mq_tag_set *set = q->tag_set; - if (!test_bit(BLK_MQ_S_TAG_ACTIVE, &q->queue_flags)) + if (!test_bit(QUEUE_FLAG_HCTX_ACTIVE, &q->queue_flags)) return true; users = atomic_read(&set->active_queues_shared_sbitmap); } else {