From patchwork Mon Jun 12 14:34:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 106666 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2660663vqr; Mon, 12 Jun 2023 08:16:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6CPofuwF8QrBy7pG8BgvwLADOFPqQdLwJY98BY08Rl9BiM4lXk29ep+iY2D1vnoKSbe9dN X-Received: by 2002:a17:907:809:b0:977:cbaf:bc56 with SMTP id wv9-20020a170907080900b00977cbafbc56mr10436483ejb.43.1686582998947; Mon, 12 Jun 2023 08:16:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686582998; cv=none; d=google.com; s=arc-20160816; b=F9IGRHr3R8JgWONI/ht3xDqvavXFRjZhIOzW3/RU+EADznYtGbB9ByOdGaccuYHKoF 6v0jNLcaRAjxTjWUdBTepjrWtlAqPnX5OY7Uznt1CnajXWcgGvzaK3HPjix+mrc9Bb85 2mDAgQ294cIlbG0hMNvoJtegLt/DpkKmrJvji1FgdbAXGhWF3y6Ty1BnmsG/rX5CRlHU 084pz62drP/+fE4+S7wjnCE3PVlKRR3YazaiKTLxlxmNEKQU24u0iy/8KbY0r7+dexc+ sa0yymE/nUGh6ExAr0CPvkmUUs7lZBcE+NlPDyYXL0wAmAjllqt9D9/LtMRiYXV/Y0Ub RYkA== 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=y9oD1no1Jl5ED5oaZg6gUA0vIFcsSBeD07uHzX7PsR0=; b=oubHJoEnW1r/F+HRb82V93hViZ/ayyjtBRyXQuxTwMnQzEZkmuHN9I+wudUN4fJ3cy BQitDDSvorGwglOPAX/d6QZDOaqiLqYsbHvOJmsDc2bmEHIHizVeQa2hC7B3bvDJvkem wt1e92XtteJvrlWvRiQmsPNH7bK51Hybmo5HGC9xuqfLMagvbg0Yj9baad382o0zh7Mr RlHclCTUMW789tXllIgz16730R9cs1USW/UOtZW4Fo/gblDdCZ/PJDp2wJ4e7YoFDoQP /B6+kXgTESElbvDaiEAo4Y688b/9aHLQ3Cntq/eQAbomukIhNJG7vb+Oddf4nn2/vnUr 7S9w== 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 c6-20020a17090603c600b009745ecdb8b4si4940422eja.183.2023.06.12.08.16.13; Mon, 12 Jun 2023 08:16:38 -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 S237568AbjFLOko (ORCPT + 99 others); Mon, 12 Jun 2023 10:40:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235308AbjFLOkf (ORCPT ); Mon, 12 Jun 2023 10:40:35 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42E0493 for ; Mon, 12 Jun 2023 07:40:33 -0700 (PDT) Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Qfv1W5KKgzTl09; Mon, 12 Jun 2023 22:18:39 +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; Mon, 12 Jun 2023 22:19:07 +0800 From: Kefeng Wang To: CC: , , , , , Kefeng Wang Subject: [PATCH -next 2/2] mm: kill [add|del]_page_to_lru_list() Date: Mon, 12 Jun 2023 22:34:14 +0800 Message-ID: <20230612143414.186389-2-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230612143414.186389-1-wangkefeng.wang@huawei.com> References: <20230612143414.186389-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768510454329331183?= X-GMAIL-MSGID: =?utf-8?q?1768510454329331183?= Now no one call [add|del]_page_to_lru_list(), let's drop unused page interfaces. Signed-off-by: Kefeng Wang Acked-by: Yu Zhao --- 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 0e1d239a882c..e9cdeb290841 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