Received: by 2002:a05:7412:a9a8:b0:f9:92ae:e617 with SMTP id o40csp33294rdh; Wed, 20 Dec 2023 15:08:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IEF8pH29CtGVrDgNDzvYzahUTkfJKcFPgexf49lgSjREXAOF4Fefdlu5/dSVVH/gql08B69 X-Received: by 2002:a17:906:fe41:b0:a26:97b3:6150 with SMTP id wz1-20020a170906fe4100b00a2697b36150mr1018327ejb.37.1703113689624; Wed, 20 Dec 2023 15:08:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703113689; cv=none; d=google.com; s=arc-20160816; b=Sbt0/2/EbcAQ9A2UTBAmfGzBRQNcpfM91wYU2Opjz49Xa0Z2uT18+b1ms3asT9YDM+ Ygu3POKhOo6Vb2aI87uci9xfP86Dq54d4IGomBF3yF9oGrWoweHIiIUohY4ckl6eOKHs oqRaWfRBHwOKhqDBTbM1+t67Wbyo8yx4LP4LH7eHYu8a8IOUiW1l1sfCX74n++lDpQPl pTCaJINyHboFAiEXu6q5i65VfEhZ57JutH4qODgdHwx5iR7VsCj+lEFrKQ3cXMewK0BX YKEju6FoZ6TtlnhOJomCnOHeJDj54lF1ZnvoUY90q4nya+4zX+Hcphs4knsD6EIRpXJw n7fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=9XkiTziRJNAJJWRX4gshftH/Gk4w9uSE1IPr6jMrvv0=; fh=UlFXU+hKOMcm6idRzNfe3Pu+B5L1f7aeir3C6i/NWQA=; b=JS2krT4RoiKvKDdCM4O3UGeaf92jXAv5lI/Cxti7rA+lIDWSLt1XFQ7kCEfsAADyKC yzxpJRmXiq102kDa6DNgDwdG/RWIBqJ5t1qBEbI3a7rM8wumtuSBT+xxIht9wVbP7Q3r NNq00ZVvKdPlVxUj0WVgca1nv07mq+TZzt/1w81vS5bI1cH1Qq775nKEQa3ZV7uo/usY f26JvxoWhsvSDcsNtWLSVc5pUAieVeBE5svxm859ICTbRJGn0HJnMPRDxdTFpc4Idpul vMRc9iYQVHAzyS2nzWhUP3ouYtZZj+PPt8z5Y/XYYrjml5AGzNeWRVgtch7996cq9iRX gjfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="FLuJJv/N"; spf=pass (google.com: domain of linux-kernel+bounces-7604-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7604-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id oz19-20020a170906cd1300b00a23761cb0bcsi265278ejb.790.2023.12.20.15.08.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 15:08:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7604-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="FLuJJv/N"; spf=pass (google.com: domain of linux-kernel+bounces-7604-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7604-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 652951F240DB for ; Wed, 20 Dec 2023 23:08:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4019879954; Wed, 20 Dec 2023 22:46:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FLuJJv/N" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B3AD79948 for ; Wed, 20 Dec 2023 22:46:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1703112409; 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=9XkiTziRJNAJJWRX4gshftH/Gk4w9uSE1IPr6jMrvv0=; b=FLuJJv/NGSs52X47AWDQeItoiey9nMqObOEkxpYx2C2HPw3m0KaTdCHY32HBLIPFR16fSL u4BMFVNsycp809VGV2pFdFqtH2MQ6o8+rohgF3UEy79s16tBxNCAck2wBXmxUK+eInjXIo EzDD9mWpeDI8YQluPGOuitc3fHBD8GA= 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-451-NmSSg2uJMuaP3fhgO4P08A-1; Wed, 20 Dec 2023 17:46:44 -0500 X-MC-Unique: NmSSg2uJMuaP3fhgO4P08A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 62C1E38425AD; Wed, 20 Dec 2023 22:46:44 +0000 (UTC) Received: from t14s.fritz.box (unknown [10.39.192.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 61C2740C6EB9; Wed, 20 Dec 2023 22:46:42 +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 v2 37/40] mm/rmap: remove page_try_dup_anon_rmap() Date: Wed, 20 Dec 2023 23:45:01 +0100 Message-ID: <20231220224504.646757-38-david@redhat.com> In-Reply-To: <20231220224504.646757-1-david@redhat.com> References: <20231220224504.646757-1-david@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 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 850aa74b6724c..0ad2ea2734e4a 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h @@ -253,7 +253,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) { @@ -478,16 +478,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 @@ -496,8 +486,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