Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp503458rdf; Fri, 3 Nov 2023 07:04:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFYeTmHEIczgla/fVzhYVsO8erDp1mo8Y79GD4jP367bORImVB224x5lW1nKCdAdURy14bL X-Received: by 2002:a05:6a20:8e2a:b0:174:63a9:293 with SMTP id y42-20020a056a208e2a00b0017463a90293mr22177062pzj.48.1699020268465; Fri, 03 Nov 2023 07:04:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699020268; cv=none; d=google.com; s=arc-20160816; b=1GBufGzP9PHtkCuyooTMLmT3UxedoVVNxKIDNkj1rAHr49uIrYzl5w/+vwVvikvPdg pcS3YtkrctZSN/Sy3c2DS0GHoyyPJGhkqkgUKQ4soxnM1eSs0baIJZ0qFtovue/A9AJL VB323fO5XgwQ0QX7IE1USwAfKJQzf70eD0Gl3jgiyy22A5o69kn0T+b4lvQKel1vnbyf GSivFWtTf+c2XJpDSBPTY9/hNKwd5fP8xPnoBrVPBsCQoV1c5UWuntI7vO+XCwy674+e F9wWWWdn+a2Aco4TE1hLFjBfRHhsyYhc1N6HwTt4PjIqagCR0DqQi7CXdYQEgzy0MWPU XCbQ== 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=81LlqxtowmFJT9OO5iZTzQqQILthz4G91XTOFcyCEIY=; fh=kUj/5waaepfljbNx30rj2BALdV0u/mUCTaFWThlgquQ=; b=uMg+fl72fIYkirgn96y5QpAdatQQeCDG6aFUV9lQQav7Q/JdR7bp/iypzuBLPnE373 qGyuEE8K9RLKq+lMOoJVm1NnVT5TYGXvvATFZnolKueah/kSyGm9JWKkkTlnCAUsB+GX 4wrvS+n1i7qGsRh38+bjKlSb+wvToGTdaRem0aNtUeIjUwg98V/y6qcBLJmJiAFd4Yph V3+y+f3XyahW78y/WoTi7pLXmdzVKB74UBlrOQ84lFurmg8P/5HdEZcsnnQzgk8t2Qdu PX/z3LcekHiGrk3tFS25iOOqceXJpve3bMlRNX/fc1hxT/s7X+Tlj+SPhKvoXHbwLFPr yLBA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id x1-20020a636301000000b0059f0cebd04csi1572025pgb.722.2023.11.03.07.04.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 07:04:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C447B82B6F60; Fri, 3 Nov 2023 07:04:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377906AbjKCOEM (ORCPT + 99 others); Fri, 3 Nov 2023 10:04:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377781AbjKCOD6 (ORCPT ); Fri, 3 Nov 2023 10:03:58 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F403D49; Fri, 3 Nov 2023 07:03:55 -0700 (PDT) Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SMMpQ1KByz1P7pc; Fri, 3 Nov 2023 22:00:46 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 3 Nov 2023 22:03:48 +0800 From: Kefeng Wang To: Andrew Morton CC: , , Matthew Wilcox , David Hildenbrand , , Kefeng Wang Subject: [PATCH 14/18] mm: remove mm_counter_file() Date: Fri, 3 Nov 2023 22:01:15 +0800 Message-ID: <20231103140119.2306578-15-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231103140119.2306578-1-wangkefeng.wang@huawei.com> References: <20231103140119.2306578-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.112.125] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 03 Nov 2023 07:04:27 -0700 (PDT) Since no one call mm_counter_file(), remove it. Signed-off-by: Kefeng Wang --- include/linux/mm.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index f5f76504b212..9353c5709c45 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2583,6 +2583,7 @@ static inline void dec_mm_counter(struct mm_struct *mm, int member) mm_trace_rss_stat(mm, member); } +/* Optimized variant when folio is already known not to be anon */ static inline int mm_counter_file_folio(struct folio *folio) { if (folio_test_swapbacked(folio)) @@ -2590,12 +2591,6 @@ static inline int mm_counter_file_folio(struct folio *folio) return MM_FILEPAGES; } -/* Optimized variant when page is already known not to be PageAnon */ -static inline int mm_counter_file(struct page *page) -{ - return mm_counter_file_folio(page_folio(page)); -} - static inline int mm_counter_folio(struct folio *folio) { if (folio_test_anon(folio)) -- 2.27.0