Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4067337rdb; Mon, 11 Dec 2023 08:01:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IFhGX/2QpV5kBAGX3x/PcUAuuKKW8fXl1MVwLCU1QKuq26624Qb07qifKgOp/FXSSIqM2OG X-Received: by 2002:a05:6a00:1d26:b0:6ce:5503:fd87 with SMTP id a38-20020a056a001d2600b006ce5503fd87mr2363429pfx.49.1702310501655; Mon, 11 Dec 2023 08:01:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702310501; cv=none; d=google.com; s=arc-20160816; b=j3tfUajs4VYIZGcvtl/GlFHQhiMhVJVCgpnstQU+e7URhHDdkjC2tfnuciSIb8fm4m F9fLPAebirc7958huaTvB4gML6XUqI6363N7spdSqO6jEEdIDeOEHTivERgCHWfsiZcq jvcWDv51i99xTnZf/fyCxIJtEdNfB3akOMJ5Mq3IbBXS8wztAwsN70ZP7D7I8tuFeXHd 2BcCNpvadX6oHQho/mG0CLPZX0tVYCzwBBwa5AePzdN5mLmuEaX7nBhPtDt7w6s2mq4d 09NofQ7LkP/4ozk3h7+Q4zZMNWEwtp5Iy1doChvdsleqLgySIuYLvZmnp57l0ivxeclG axdg== 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 :dkim-signature; bh=Bl7kAOkMik26idrH9JyJnR9t8BI/kVxIDTOYx+vyhms=; fh=UlFXU+hKOMcm6idRzNfe3Pu+B5L1f7aeir3C6i/NWQA=; b=iuLczI8Op/CCqZzrQUx3vLG/vfQthaJhlPn2ZnR7UxthjatGkOiaSArfGnCkHbdvF7 DxL3TLVEaQjIeMRu2dYO1DY8JRQ+F+o1fyF7VqSntIIoeeBkK5L8L1GwLLy4O6zHxM1U oWnEjBP0KM9W7jRsTeZFn7uIfnUGyP9etczLbnsgAAJCHGDQPGcimEDkKG7JY+WKUJeZ 1qZyCKg22o/eWw3KCCQtRCyqOEz8RAdWgCRIhG0DrzndYgM/H3qMotfB6EN2ftLELQhG T5TettFFslYgiAbbd2/UHafPNna3iez98/DNxZNrZa9iODdzLCiXJyBzDjSHvmWVQzX7 UUsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iv5WN+IE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id bd33-20020a056a0027a100b006cbd8179b4csi6296180pfb.108.2023.12.11.08.01.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 08:01:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iv5WN+IE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 1651F80898ED; Mon, 11 Dec 2023 08:00:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344555AbjLKP7w (ORCPT + 99 others); Mon, 11 Dec 2023 10:59:52 -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: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 11 Dec 2023 08:00:25 -0800 (PST) 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_area_struct *, void hugetlb_add_new_anon_rmap(struct folio *, struct vm_area_struct *, unsigned long address); -/* 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 folio *folio, #endif } -static inline int page_try_dup_anon_rmap(struct page *page, bool compound, - struct vm_area_struct *vma) -{ - struct folio *folio = 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 possibly * shared to prepare for KSM or temporary unmapping @@ -499,8 +489,8 @@ static inline int page_try_dup_anon_rmap(struct page *page, bool compound, * The caller needs to hold the PT lock and has to have the page table entry * cleared/invalidated. * - * This is similar to page_try_dup_anon_rmap(), however, not used during fork() - * 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 temporarily * unmapping a page (swap, migration) via folio_remove_rmap_*(). * * Marking the page shared can only fail if the page may be pinned; device -- 2.43.0