From nobody Fri Dec 19 14:35:22 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 714C8C4167B for ; Mon, 11 Dec 2023 16:00:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344652AbjLKP7x (ORCPT ); Mon, 11 Dec 2023 10:59:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344726AbjLKP6p (ORCPT ); Mon, 11 Dec 2023 10:58:45 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03A68171C for ; Mon, 11 Dec 2023 07:58:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702310316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Bl7kAOkMik26idrH9JyJnR9t8BI/kVxIDTOYx+vyhms=; b=iv5WN+IEbxhaG5qmVLgDrAs3JEuq4evZhbFX7EzjlT2Hf3aj2zEjJwCTNlaQLxMA/mADyi IZ+bufr2CgcGcwqpryeTP10e4Sm8i/fELlr6xgCTS33OrSC/PFjj7l8/pL+0JPpK7qUFk5 AXbPbEnIXwjRr/QkTcxNxNoO0oSumPY= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-382-bVYLacyzO7-p7IF_oXo34w-1; Mon, 11 Dec 2023 10:58:31 -0500 X-MC-Unique: bVYLacyzO7-p7IF_oXo34w-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D01CC280640D; Mon, 11 Dec 2023 15:58:30 +0000 (UTC) Received: from t14s.redhat.com (unknown [10.39.192.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id 945CB1121306; Mon, 11 Dec 2023 15:58:28 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , Andrew Morton , "Matthew Wilcox (Oracle)" , Hugh Dickins , Ryan Roberts , Yin Fengwei , Mike Kravetz , Muchun Song , Peter Xu Subject: [PATCH v1 37/39] mm/rmap: remove page_try_dup_anon_rmap() Date: Mon, 11 Dec 2023 16:56:50 +0100 Message-ID: <20231211155652.131054-38-david@redhat.com> In-Reply-To: <20231211155652.131054-1-david@redhat.com> References: <20231211155652.131054-1-david@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" All users are gone, remove page_try_dup_anon_rmap() and any remaining traces. Signed-off-by: David Hildenbrand --- include/linux/rmap.h | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/include/linux/rmap.h b/include/linux/rmap.h index c6d8a02ecd56..1e37ee6ae0ba 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h @@ -256,7 +256,7 @@ void hugetlb_add_anon_rmap(struct folio *, struct vm_ar= ea_struct *, void hugetlb_add_new_anon_rmap(struct folio *, struct vm_area_struct *, unsigned long address); =20 -/* See page_try_dup_anon_rmap() */ +/* See folio_try_dup_anon_rmap_*() */ static inline int hugetlb_try_dup_anon_rmap(struct folio *folio, struct vm_area_struct *vma) { @@ -481,16 +481,6 @@ static inline int folio_try_dup_anon_rmap_pmd(struct f= olio *folio, #endif } =20 -static inline int page_try_dup_anon_rmap(struct page *page, bool compound, - struct vm_area_struct *vma) -{ - struct folio *folio =3D page_folio(page); - - if (likely(!compound)) - return folio_try_dup_anon_rmap_pte(folio, page, vma); - return folio_try_dup_anon_rmap_pmd(folio, page, vma); -} - /** * page_try_share_anon_rmap - try marking an exclusive anonymous page poss= ibly * shared to prepare for KSM or temporary unmapping @@ -499,8 +489,8 @@ static inline int page_try_dup_anon_rmap(struct page *p= age, bool compound, * The caller needs to hold the PT lock and has to have the page table ent= ry * cleared/invalidated. * - * This is similar to page_try_dup_anon_rmap(), however, not used during f= ork() - * to duplicate a mapping, but instead to prepare for KSM or temporarily + * This is similar to folio_try_dup_anon_rmap_*(), however, not used during + * fork() to duplicate a mapping, but instead to prepare for KSM or tempor= arily * unmapping a page (swap, migration) via folio_remove_rmap_*(). * * Marking the page shared can only fail if the page may be pinned; device --=20 2.43.0