Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp22244207rwd; Fri, 30 Jun 2023 05:53:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5FF5P1wBnL00Wf3KfUmVOHfddN5FiTGfFlo5FkYWqoDEkItX0yxg4Pu0CsfST/fo63zXX7 X-Received: by 2002:a05:6808:9a1:b0:3a1:e566:4b7 with SMTP id e1-20020a05680809a100b003a1e56604b7mr2347025oig.51.1688129627612; Fri, 30 Jun 2023 05:53:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688129627; cv=none; d=google.com; s=arc-20160816; b=pyWl2As7w4Tn/eMEAonXn/88OIA1ZQAjV+Ip+jbbcrSFx7hyzKzt7yp+hIcr7Z/SDb zJ49HyJ8byztd1h3ka6PeL9a7hLI7H3DPPAyVFvyr3TnzbHpoHkDsZOBkpGy8fLsrcax Z9wMXc82tzUSMSWfD2zUvrCwUPbz4JdtyAJHz2QAf/PFdg9FOhGG2xGTH3On2qWsAODy guB5MakxQwp+x85GspJoGnvvpXZ1LyjZmxmfRFKAfmsXrOV7yyA+M5M0aDYbWot+pRZH X7Jr6V732Y8Yk9XsFtBh2y500vmlyc+ixEfDAmTOcLtHbvwELmJvDWbSv8Drr6W+pA42 5TDw== 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=MBZ7vvpVYusarV6ekdjHXkir2egpRNeipnLA+F+ZSxI=; fh=JTrvrbGtYtGElJnl173AUP1Npy20iXcoXGS/wWbJpCA=; b=G9iLFWhuQ2xbgvVoOmoQCLGwrbDE58IQxuoC03QM6ASaMqBbbIXb3F7xDwopVJQGYx DMhb3tfer9i9075HDIutSMtI0CGhcr4rn3NeXJM87sKUC6Jwezhaa+vIQheXDG8oN9Qr hyi0UR6o9N0fOTU6ZVMfvVx4h8S2eBstlbPVsPWgTdfHZGpGwPlhTcbufqJpkwINjnyQ W4dgwVV5j98O9R8oX+m+ArnZqshrKuLWGqoXJ/HmY1jy3wzBFUCk0L3xW6Mn02XD4stq kI37nDs3U4Fz/zfddAoF+f8RKGrMiZ48LacZVIPnFgDqRQL5aPi738zpEnKuMPWa5dwv R8tQ== 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 m11-20020a17090a730b00b0025983055d94si14170956pjk.97.2023.06.30.05.53.32; Fri, 30 Jun 2023 05:53:47 -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 S232583AbjF3MNb (ORCPT + 99 others); Fri, 30 Jun 2023 08:13:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232079AbjF3MNZ (ORCPT ); Fri, 30 Jun 2023 08:13:25 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31690170E for ; Fri, 30 Jun 2023 05:13:24 -0700 (PDT) Received: from kwepemm600020.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4QsvMZ5K4JzTldR; Fri, 30 Jun 2023 20:12:26 +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; Fri, 30 Jun 2023 20:13:21 +0800 From: Peng Zhang To: , CC: , , , , , ZhangPeng Subject: [PATCH 1/2] mm: remove page_rmapping() Date: Fri, 30 Jun 2023 20:13:09 +0800 Message-ID: <20230630121310.165700-2-zhangpeng362@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230630121310.165700-1-zhangpeng362@huawei.com> References: <20230630121310.165700-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: dggems703-chm.china.huawei.com (10.3.19.180) 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 --- include/linux/mm.h | 1 - mm/memory.c | 2 +- mm/util.c | 6 ------ 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 9ecb8b9c07f6..8c7eba7370b2 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2129,7 +2129,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/memory.c b/mm/memory.c index 21fab2727209..6921df44a99f 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2979,7 +2979,7 @@ static vm_fault_t fault_dirty_shared_page(struct vm_fault *vmf) * pinned by vma->vm_file's reference. We rely on unlock_page()'s * release semantics to prevent the compiler from undoing this copying. */ - mapping = page_rmapping(page); + mapping = folio_raw_mapping(page_folio(page)); unlock_page(page); if (!page_mkwrite) 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