Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp112128pxk; Tue, 8 Sep 2020 23:57:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvsh6ngSvsL/qzljHkpQU8LqmKcz5khwTC0xXW9Gsxl57c5gf/0yYe2TSp7CeBxk5wM2uF X-Received: by 2002:a50:ed8d:: with SMTP id h13mr2624469edr.50.1599634651033; Tue, 08 Sep 2020 23:57:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599634651; cv=none; d=google.com; s=arc-20160816; b=vwTdqqvf9p7z4IFgb6BoyxilCpSX+viCjIw0+NBRp4tpIDEfvkc0ddBYGv6mXi5JjU 5kmfpxNt9geQ9WeXWwjrf26qEvdQiBV77DiLcbs44bnI6oswR1nnckzmcO1519kGg02p rBhWVUO52h/pfva41s5Cejjw/yOLCCAttmlDX0X5GEYla15OQCrQ/XYv+vDSZoTpUBMJ EvSEYG4lU8Lu05r996DmYXD+TwP8woR79Z1REFMeoHLeiE7sqdvT0TaUP9tp9oTXmzt8 ejaDyoQCDEVDu3KHRtoR4PAn1i2FtMR9poyErNw5ib8CgUpjDyONzVvJVqZuXYtmNH0R gVqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=aqCjD1Y+CbnqIyPCawZvuEn9zBkpdyM5WFFyD8yKy6U=; b=TpBv3naOiCpRMBbKuxvfG8wnoUvCo2nxcU/pnZ5cxHhfjcYAr4XHip7zDW7RuQZohB +tbBsQs3+yNLSYWY/msSLQkahTj2aFfZUCZJnBjmSnfBbTL922y2eenVwGGXWop5aQh8 hI+DQnxeh1fS/+VcDYmwFtXGNx4aXAKKuqCOy7su0WT1vOJgrDoEkWJIx0v0/8Q9W8/X HRYRH5249D51r+zjh6gTV+a74T8+ByP1UgG8d1sGWl6WEfHg/TuMKnLE0TI3YgkPYGo9 nAjAVBL+hBSzZx2nAuzTcZ6NApRCvni48VuCsUPgybI62gW+Dn1iZEenfjMtBIztD7E3 n0mA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k6si892098eds.235.2020.09.08.23.57.08; Tue, 08 Sep 2020 23:57:31 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726534AbgIIG4Z (ORCPT + 99 others); Wed, 9 Sep 2020 02:56:25 -0400 Received: from smtp.h3c.com ([60.191.123.56]:26358 "EHLO h3cspam01-ex.h3c.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725863AbgIIG4Y (ORCPT ); Wed, 9 Sep 2020 02:56:24 -0400 Received: from DAG2EX03-BASE.srv.huawei-3com.com ([10.8.0.66]) by h3cspam01-ex.h3c.com with ESMTPS id 0896u51D043736 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 9 Sep 2020 14:56:05 +0800 (GMT-8) (envelope-from tian.xianting@h3c.com) Received: from localhost.localdomain (10.99.212.201) by DAG2EX03-BASE.srv.huawei-3com.com (10.8.0.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 9 Sep 2020 14:56:07 +0800 From: Xianting Tian To: , , , , , , , , CC: , , , , Xianting Tian Subject: [PATCH] block: remove redundant empty check of mq_list Date: Wed, 9 Sep 2020 14:48:14 +0800 Message-ID: <20200909064814.5704-1-tian.xianting@h3c.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.99.212.201] X-ClientProxiedBy: BJSMTP02-EX.srv.huawei-3com.com (10.63.20.133) To DAG2EX03-BASE.srv.huawei-3com.com (10.8.0.66) X-DNSRBL: X-MAIL: h3cspam01-ex.h3c.com 0896u51D043736 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org blk_mq_flush_plug_list() itself will do the empty check of mq_list, so remove such check in blk_flush_plug_list(). Actually normally mq_list is not empty when blk_flush_plug_list is called. Signed-off-by: Xianting Tian --- block/blk-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 10c08ac50..dda301610 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1864,8 +1864,7 @@ void blk_flush_plug_list(struct blk_plug *plug, bool from_schedule) { flush_plug_callbacks(plug, from_schedule); - if (!list_empty(&plug->mq_list)) - blk_mq_flush_plug_list(plug, from_schedule); + blk_mq_flush_plug_list(plug, from_schedule); } /** -- 2.17.1