Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp23268594rwd; Fri, 30 Jun 2023 22:05:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlEfhRrr+9PWi8zckVb+axljiFbUmi9cgdVHU91pHcku7Vz1H8JMnOo5kJRHSjVL42PjojsO X-Received: by 2002:a17:90a:d484:b0:263:5333:ca26 with SMTP id s4-20020a17090ad48400b002635333ca26mr3062450pju.29.1688187912065; Fri, 30 Jun 2023 22:05:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688187912; cv=none; d=google.com; s=arc-20160816; b=bZq7KCWOjFiQcvDrlMznpc61VcU1PhB2bcPffkRZBaRAmVrWcnqU+6gTMkcJ0ruVjr FsUzVdqS1hL0YX042YjhGHhZXmb6dUOfdWrlk4CquMPeDwVoppsx8ybWzGMtb0ZmHVMD lZXCW7DXTjOqLSlD38JngHk+A+hi5SFw3P3Yu21MkRUhuBp99wVAEHhuYcKzOT+7hVJw D1/GDnu3jUHTP/nB38dGaq84F59PfF19i+pY10m8ObpHOv8dWDVM07UJNp9TK9cKvR3z IvWofRzruNNu7zRqHMT64AC8P40LDzuDODivFlT+HyBKO8y1YDntMumatrcp32XS2FZR NmSg== 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=ujxWhUdZ8e95tYxZPweIspq//YcJm1P8WVFMF78gXQk=; fh=sseU4O+oqopp12EPmhxR3nh+ngQh6y4sT1gRFnXeDhs=; b=HC1n6JsOsHhRRARw7ecH6Ms0ORSUaOeKbqFFoYkr+trxDL2xX7hWOdF2dAqZtYfmXs C5m6Mx7SyPkpV+MyyNHPbP4W7VYuJw1QBF/ywihWf6L16DUvD0bplLymbGP45+1GypjN PMlPS4iUppwbSYiHVcFjbrQxMub0rZLJhj4zixUChldtG6u+bfgFd/FrgrDNnmUGV933 Wrn0mKGS8RZId1LKDW2GqT0ZD/+n+AS5pjQnNvbxiFiFG9U2t2ujAdPHD3755qmtA0Rk Flr9jx4pdTiR+WQ6waI+7MXqpBBq79Lvo90yfjthDok/PSD+mfd7WXHbUXSPhnxPT82T pM4w== 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 201-20020a6301d2000000b0055381e05244si14260394pgb.777.2023.06.30.22.04.44; Fri, 30 Jun 2023 22:05:12 -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 S231236AbjGADgl (ORCPT + 99 others); Fri, 30 Jun 2023 23:36:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230510AbjGADeu (ORCPT ); Fri, 30 Jun 2023 23:34:50 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E33A49EE for ; Fri, 30 Jun 2023 20:29:03 -0700 (PDT) Received: from kwepemm600020.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4QtHdS5jrzzMn2K; Sat, 1 Jul 2023 11:25:48 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by kwepemm600020.china.huawei.com (7.193.23.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Sat, 1 Jul 2023 11:29:00 +0800 From: Peng Zhang To: , , , CC: , , , ZhangPeng Subject: [PATCH v2 2/2] mm: remove page_rmapping() Date: Sat, 1 Jul 2023 11:28:53 +0800 Message-ID: <20230701032853.258697-3-zhangpeng362@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230701032853.258697-1-zhangpeng362@huawei.com> References: <20230701032853.258697-1-zhangpeng362@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: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600020.china.huawei.com (7.193.23.147) 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 From: ZhangPeng After converting the last user to folio_raw_mapping(), we can safely remove the function. Signed-off-by: ZhangPeng Reviewed-by: Sidhartha Kumar --- include/linux/mm.h | 1 - mm/util.c | 6 ------ 2 files changed, 7 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 39aa409e84d5..c849419c6b51 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2151,7 +2151,6 @@ static inline void *folio_address(const struct folio *folio) return page_address(&folio->page); } -extern void *page_rmapping(struct page *page); extern pgoff_t __page_file_index(struct page *page); /* diff --git a/mm/util.c b/mm/util.c index dd12b9531ac4..5e9305189c3f 100644 --- a/mm/util.c +++ b/mm/util.c @@ -734,12 +734,6 @@ void *vcalloc(size_t n, size_t size) } EXPORT_SYMBOL(vcalloc); -/* Neutral page->mapping pointer to address_space or anon_vma or other */ -void *page_rmapping(struct page *page) -{ - return folio_raw_mapping(page_folio(page)); -} - struct anon_vma *folio_anon_vma(struct folio *folio) { unsigned long mapping = (unsigned long)folio->mapping; -- 2.25.1