From patchwork Mon Jun 19 11:07:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 109928 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2937853vqr; Mon, 19 Jun 2023 04:29:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5CysKQXsxgfP31WN30zNkmOaBcz2jKObr4OKMgCLKLNSGo+U0HnxctEyLUN1OvCvBQ3SlN X-Received: by 2002:a05:6808:641:b0:39c:7a71:945 with SMTP id z1-20020a056808064100b0039c7a710945mr10080153oih.56.1687174166276; Mon, 19 Jun 2023 04:29:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687174166; cv=none; d=google.com; s=arc-20160816; b=NiCKU12bkGHDL/NxHCo/SHvQ33Z0VbyFXfObRUXRiuPJuCgQPoh0Q+ZTn62Ocd15/r nR3yO6AZhhR9GOGG5OWdjUCYOZkty3LiCk8OrJDt1bH644/NFi9U0fbOywGn5u4FgESu ziLfeRvezNmNzqxLAvFKB7BeT7Vbm7x60n8xlPLtjGZdzdVLQIsrtapBnwIkTh1FRsxv iDBc6atvbGxo8WRUAapsfwu6SWuGkPfOvqIWQba2GlqTVNB3ZW526VhEVLY9Y+9BGGuM bOqS/GW7I7yLosvZDmpRL7Tkkdw3xWwAzvwqdh2gH8BnwMZ4vgGVGfotPKV1yiko4CNI Jisw== 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=kSeVltLVwL4S4NL52guaL9XBMWx3z7eLOSLgWslw1ZM=; b=qAY2SwaYaaEX41zuJkhTGErKqtk85hgPDq2ZERwF2NSPREkosnAG5I8m2NedCSWmil 3VYDuOd2P27GYaCecOCiaDGaeOM+ZQayhfAVxdmqLzw/I/OOQjy8Jf/fcrmTRulNtoBH vOMMy/EWFXkVq8PB9mC2yVb4yPy5aTpVnaxheq62IY2A+63vHTmpliY1BNar3V2UL6BM hgj3GaY0as2evFTGwS0c8Apnpbf0qt4Wh5XmZdbYv61Gudl/27tvDtixoqDx0JOH9RsG 1DwSnufggTJ9OPBLUh8fVY/mnl6Abjla0tI4lIZdBEIA8V3ozrC7M775A4OnTUK7tQsb s0mQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r12-20020a170902c60c00b001b51c68c828si7917200plr.211.2023.06.19.04.29.12; Mon, 19 Jun 2023 04:29:26 -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 S232338AbjFSKyf (ORCPT + 99 others); Mon, 19 Jun 2023 06:54:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232295AbjFSKyO (ORCPT ); Mon, 19 Jun 2023 06:54:14 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD0F51723 for ; Mon, 19 Jun 2023 03:52:47 -0700 (PDT) Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Ql6364fZ0zMp0X; Mon, 19 Jun 2023 18:49: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.27; Mon, 19 Jun 2023 18:52:45 +0800 From: Kefeng Wang To: CC: , , , , , Kefeng Wang Subject: [PATCH -next v2 2/2] mm: kill [add|del]_page_to_lru_list() Date: Mon, 19 Jun 2023 19:07:18 +0800 Message-ID: <20230619110718.65679-2-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230619110718.65679-1-wangkefeng.wang@huawei.com> References: <20230619110718.65679-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769130338649246892?= X-GMAIL-MSGID: =?utf-8?q?1769130338649246892?= Now no one call [add|del]_page_to_lru_list(), let's drop unused page interfaces. Acked-by: Yu Zhao Signed-off-by: Kefeng Wang --- v2: add ACK include/linux/mm_inline.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h index 08c2bcefcb2b..21d6c72bcc71 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h @@ -323,12 +323,6 @@ void lruvec_add_folio(struct lruvec *lruvec, struct folio *folio) list_add(&folio->lru, &lruvec->lists[lru]); } -static __always_inline void add_page_to_lru_list(struct page *page, - struct lruvec *lruvec) -{ - lruvec_add_folio(lruvec, page_folio(page)); -} - static __always_inline void lruvec_add_folio_tail(struct lruvec *lruvec, struct folio *folio) { @@ -357,12 +351,6 @@ void lruvec_del_folio(struct lruvec *lruvec, struct folio *folio) -folio_nr_pages(folio)); } -static __always_inline void del_page_from_lru_list(struct page *page, - struct lruvec *lruvec) -{ - lruvec_del_folio(lruvec, page_folio(page)); -} - #ifdef CONFIG_ANON_VMA_NAME /* * mmap_lock should be read-locked when calling anon_vma_name(). Caller should