From patchwork Sat Jul 1 03:28:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Zhang X-Patchwork-Id: 13298862 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AC16EB64DD for ; Sat, 1 Jul 2023 03:29:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 518408E0064; Fri, 30 Jun 2023 23:29:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4C93E8E0059; Fri, 30 Jun 2023 23:29:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 36AAA8E0064; Fri, 30 Jun 2023 23:29:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 236B38E0059 for ; Fri, 30 Jun 2023 23:29:08 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id EB8DE1203A5 for ; Sat, 1 Jul 2023 03:29:07 +0000 (UTC) X-FDA: 80961611934.19.C80ED47 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf27.hostedemail.com (Postfix) with ESMTP id C609040010 for ; Sat, 1 Jul 2023 03:29:05 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=none; spf=pass (imf27.hostedemail.com: domain of zhangpeng362@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=zhangpeng362@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1688182146; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ujxWhUdZ8e95tYxZPweIspq//YcJm1P8WVFMF78gXQk=; b=AAZB/R9xoBMcYK/bLsqdewlfWcc0HdJyA8LhKTcR0zePPZ8b8FG5kQRTKhZlo2haMfUmZ2 mLVuwWI6d5ytOMg/sOiEycaYQOtc2CDDOty5b36RLjDN3BgxLOYLRUrP3eplI+qHYFV219 9xKDm/EUv1FunvD3WEKhkIaA6j2Q22w= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1688182146; a=rsa-sha256; cv=none; b=h8yxjpdjfDOXcq11QcWP6Myp8enxzMcqGarTMK07XtMQVfl2bm5CUE2Dmb6PVGi5q8dw9s LawBro+k+kbOULaWAnHKPLzY5K9ZkitDuhtYm6lQRfbSZLVTXs8n8YRLK7HFWrusF6arTW ANXiv1fWuP7cgsJUl4zCdocTJQ+6Cy4= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; spf=pass (imf27.hostedemail.com: domain of zhangpeng362@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=zhangpeng362@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com 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 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-Rspamd-Queue-Id: C609040010 X-Rspam-User: X-Stat-Signature: 8qy3tqu3e5orq689y4sw9jb9sjgoxa5t X-Rspamd-Server: rspam03 X-HE-Tag: 1688182145-302131 X-HE-Meta: U2FsdGVkX185YgXUv+kmC6F5FTDh+yXTVN77CXjbiQ7+sQdwcjM2o/fOB2QrSoTqHHMfIrAhnW9womUbYr1aTSngVnOUnem67PE1+yHw/QRzCSr9Si+l1arNVYNuMdUq7/y3hHa/kxzypfOUap6dAZIAJDdfx46uHK5ojQoWp/Kzik9Z10VWj9fwAccpkKvR3f6d5JlF8gJq4dANS+WxICUkPaNXp1xxm6RBykJSroRgwMvDWdesvK5dXGCPQdIFfEEXaD6WXyY87YUBbqb0FCJ9UknhTubSLmX8ZjdmTncfcegO5VwwbwJ88ALqnfYjBJtbxVVoxvR6mT2JJ7rXuc+lnzhJ3VZCVRoXQBVW1SOUu7qHNiraXIeDiOpH/pPKZTQ4e2vLtRdiRu+VrUlZphrQbK6EVrxUEqWc5a8jQ3h6kIwKEMQiwQtRLsFKrlYKPjwc+X9FYqzGCC10tvlAmPkUfqvvFsVRKHOlITlDmOfCf9KkcnBN5RwwDg+HzuMSTkugcspmuUzaPRSX979rNB6Zxn325/Q3aysO7/Y7tLrq4qLn/x0xo7QrTvwYthBVzCZ2kOyeOcnQklfNP2ZKMyNxTVT52Kcl09x5dik2EB0Php+AOu+9Jizs8WAzSnRGxwPEtECaDMdWMwp/td3jSuWkmqJRYFqS8+pDay5f8KzN2VUDmUqH+WK5t0haocikcgn4GzyjCq18aQR8/uPOkr5i8h81KE9IHpBi1IFtbze9D3Fm8QS/9YpmGik8LODBxazZjNxP0vHkPyTVOsRMfkOWUsopCdcOa8w7PgV+WoxqJ+hMO0Seo3guK8ag3LTInziktyBkl8WFyFLdi5q0P8eEz7tNecDpC9kKIYl2zrJKnhF/BMsuKJq8CEWCwcc2owQrz2KF5laHRjHCc+fYZQggegUnX+EFyervBoyCrTN7y7Uqbe/Y6bMbRYYixYcHLzsAH4hmiVeLi2db51/ odOdbWWX s/BYj40yJJuJuA8EqbEDo/jXoN8VsEQd1lX6tmmhDs1go1cCjgYGGg5hMSRHXlvkCPVwWAhOdCJCkp9VaDfyPtLEu7vn71lmm001j/CozMPP7OoLnPd9nIQQ/4J0rUeh6pWLA+HUAhFL2rGcYrt1SKyBIrXPxnoocY88kzdBfLu+07e4cLQc1DNUTkWMzUK2GrnmIQC+YnaAZsDbQJGl7KjUx7A== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 Reviewed-by: Matthew Wilcox (Oracle) --- 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;