Received: by 2002:a05:6a10:87d6:0:0:0:0 with SMTP id g22csp560935pxr; Mon, 11 Apr 2022 00:53:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7VDW0sG2H4NHK0uGtgSbND0F1JhD51hICj5PsnGs9g0LJeoR2yldQB403Bsu0fV3d0D/J X-Received: by 2002:a17:902:a9c4:b0:151:a83a:5402 with SMTP id b4-20020a170902a9c400b00151a83a5402mr31364779plr.21.1649663597816; Mon, 11 Apr 2022 00:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649663597; cv=none; d=google.com; s=arc-20160816; b=jWGQCXcAgeiyKeKj3EsujXSpvZ2J0hcHywf4yAdQxd78aCToRKAETCTlJZwwMpdrTO TyvmFBuLSasGFZmzksQfd9b5zS4Tbsv0/66us+C2ma8Zw6Hk6BwZixhY+D6ATH9jn+zV bySL4j4Rdwz0GyfoCn43w4Bg4w5yArMThDHzfN1YEKREoJHke+f/scQPbBVQSdIhivRA ooNBUX/YmEWPaIaa2NKhtROh9JWNqawC5ssvI0oXEv1VBaKkKBgfk3Gps8EfwNQVllLr zgDhn84Y5qrPfBFvZLQPiORbWd/WEq0v5rfT+JDNjaCIeEYfRJwtOWwWfXYVpphqtoZF +Zew== 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=30xlCr6F0QI8cDzk+LMA2PJ9tG83Jw+M5trmzlDr5vw=; b=kiz3zRQ4ST1uz10H0kJg1binSFVJYGQJ3wSojXuGsYZOztX4/dlEJgBbM6I5u28hfo V6TNpI1o4U13nJOY4UAOiWvb04nVZgzOArWDnmQITHFN+Omd/jJ06CaS66gGN/7R0MPH WycvdaUHxzNXgp59G3mHx+qxg5ZfyZkfTcQ3Mpk0b5og6GujxBqV63YDj1Ggmd2Xz4+O 8uOmj2MtQ5D8RiGPNQ9V3gno8TdN2X/8Y4xg/9bqW1E9xpdW2W7iDiADgSk84dN6newx m8ub/edJiMaRaA20yu7WhsZtmFsOp9DOrybjbcfImrs6fDK12c/87mk64lFh43HDDZL7 RUGA== 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 z18-20020a170903019200b001567b004ecdsi8746642plg.551.2022.04.11.00.53.04; Mon, 11 Apr 2022 00:53:17 -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 S241328AbiDIJhO (ORCPT + 99 others); Sat, 9 Apr 2022 05:37:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241232AbiDIJgl (ORCPT ); Sat, 9 Apr 2022 05:36:41 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83E1D16CE46 for ; Sat, 9 Apr 2022 02:34:35 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Kb8z02pYBzDq8C; Sat, 9 Apr 2022 17:32:12 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 9 Apr 2022 17:34:33 +0800 From: Miaohe Lin To: CC: , , , , , , Subject: [PATCH v2 9/9] mm/vmscan: use helper folio_is_file_lru() Date: Sat, 9 Apr 2022 17:35:00 +0800 Message-ID: <20220409093500.10329-10-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220409093500.10329-1-linmiaohe@huawei.com> References: <20220409093500.10329-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,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 helper folio_is_file_lru() to check whether folio is file lru. Minor readability improvement. Signed-off-by: Miaohe Lin --- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 79310b3cbbe3..208ce417f1a4 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1421,7 +1421,7 @@ static enum page_references folio_check_references(struct folio *folio, } /* Reclaim if clean, defer dirty folios to writeback */ - if (referenced_folio && !folio_test_swapbacked(folio)) + if (referenced_folio && folio_is_file_lru(folio)) return PAGEREF_RECLAIM_CLEAN; return PAGEREF_RECLAIM; -- 2.23.0