Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp218432rwd; Mon, 15 May 2023 23:23:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5vFth2XWqqnzE4Qs+/OhlszgDzQGLUvl7k+dd9DcPB98sb0Y70SSvZwxCc6ojHiT/FE2dv X-Received: by 2002:a17:903:2448:b0:1ab:1a6:34bc with SMTP id l8-20020a170903244800b001ab01a634bcmr46307660pls.9.1684218210654; Mon, 15 May 2023 23:23:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684218210; cv=none; d=google.com; s=arc-20160816; b=z85FkIBOEWlPxvAmDqBzwQJU3bVPnJtuTFshpz871zo7APuV/PL9ra+9Xgw8/N2pe/ SWJI8NjRMsyluKamQ+f5F2Oiof9eJxwYrFejpgaUBsof8VMMDxt9V2/7l7NzX2OpwmXn gzc9MofpB6jQXLN2dfq6z+f8hwYuW8BnnBBNFb5HRvHRgzzBsHIUW9tRFFoqiWs3Wm7Q ugKfgTZLAhXWcIdqtpqSepi5FM+anK8yCUoCIqAzX8yINty6Fq8fkZDXC0YmvYJXQNQU Jj3rtsUfZb/h2pbfnct3+172Rcp2ms3/99+lARb3W2GpSy4cK2reNctgE/2//r0aIB08 nc7w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=pEQmbXru6q4li0fN/aC7FJHKouP8VLqgIOaYkU8mCOk=; b=L/i6XHMz9s6bbVrtkAJhUyDemh5ckU8ecj/iMqjcME6hV6nV1jCx15uVoDWlE84/9w 54cjD++ZOJJIgJdtk/7lB97aIzQwmQk6mjWyA024QimFnTmEie+KDIytxi6vL66UXzNo T26rYKsyLcc7nFtq8NvgB98gbxIMc5Vp0QhF1I5TabCUpvWXetmLAZi77NKPbYH6F52D YaEJLDmqWeiqIFqRAy+JTKPfr+NSAZINpAEXFuH/Hyp2/ASU8xQ487w7jO6doj6por/M 1jgHb3hWRiyaK8Z9GT54MX02myJs3WY9kcGIgW3vnb6o4OiAEabVNLSC9rXsW+QkvmIf Y2bg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o23-20020a170902779700b001a6f0eab385si17201861pll.55.2023.05.15.23.23.19; Mon, 15 May 2023 23:23:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230243AbjEPGWJ (ORCPT + 99 others); Tue, 16 May 2023 02:22:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230120AbjEPGVm (ORCPT ); Tue, 16 May 2023 02:21:42 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A81B2423C; Mon, 15 May 2023 23:21:38 -0700 (PDT) Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4QL5gG1gffzsSGt; Tue, 16 May 2023 14:19:38 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 16 May 2023 14:21:36 +0800 From: Kefeng Wang To: Andrew Morton , Mike Rapoport , CC: David Hildenbrand , Oscar Salvador , "Rafael J. Wysocki" , Pavel Machek , Len Brown , Luis Chamberlain , Kees Cook , Iurii Zaikin , , , , , Kefeng Wang Subject: [PATCH v2 11/13] mm: vmscan: use gfp_has_io_fs() Date: Tue, 16 May 2023 14:38:19 +0800 Message-ID: <20230516063821.121844-12-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230516063821.121844-1-wangkefeng.wang@huawei.com> References: <20230516063821.121844-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use gfp_has_io_fs() instead of open-code. Signed-off-by: Kefeng Wang --- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 6d0cd2840cf0..15efbfbb1963 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2458,7 +2458,7 @@ static int too_many_isolated(struct pglist_data *pgdat, int file, * won't get blocked by normal direct-reclaimers, forming a circular * deadlock. */ - if ((sc->gfp_mask & (__GFP_IO | __GFP_FS)) == (__GFP_IO | __GFP_FS)) + if (gfp_has_io_fs(sc->gfp_mask)) inactive >>= 3; too_many = isolated > inactive; -- 2.35.3