Message ID | 20231220224504.646757-13-david@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 7676DC3DA6E for <linux-mm@archiver.kernel.org>; Wed, 20 Dec 2023 22:45:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D2A168D0002; Wed, 20 Dec 2023 17:45:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CADC68D000F; Wed, 20 Dec 2023 17:45:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A3C5B8D0002; Wed, 20 Dec 2023 17:45:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 7CEF78D000D for <linux-mm@kvack.org>; Wed, 20 Dec 2023 17:45:44 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 4FB76405F7 for <linux-mm@kvack.org>; Wed, 20 Dec 2023 22:45:44 +0000 (UTC) X-FDA: 81588680208.05.9272149 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf20.hostedemail.com (Postfix) with ESMTP id A0DCC1C0011 for <linux-mm@kvack.org>; Wed, 20 Dec 2023 22:45:42 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=M7pnIPf+; spf=pass (imf20.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1703112342; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ylNzjWXs3fCxjx+PVR/JHpztU6Uk8qsi+uFdQ6XNBcU=; b=JTbaLsmbF5S03Gu7VbrlH0o87znxN/10VrQ/TJ3CXJEMrG3lweDKHYuCpjU3XlliWqvzU+ e7xpAZjb6w3RjjnZvbCTjI8mmxg/Le6rBwBMf6SOG/uLdRoqs2MCqG52OgjH2RRLQeUbTx IMkesM76dp9UEJ2mOHGpggqgjN5L+Rg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1703112342; a=rsa-sha256; cv=none; b=rr4dZR5/E6OsOocSbL4EIY9S9NICHBtVBJ23/oBzy2Agco6Aj8PUZ641DM+N56K3flpp8E jKPiQIC40iPmBjWxx5kh0YxMyLXVHb3tRSNcIf+4ubh4v/AhQbsbyx5dHiqW/ip5y2hQmV ufwFgIOZQBivXVzL9H8BiGGhCI0Tjk8= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=M7pnIPf+; spf=pass (imf20.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1703112342; 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=ylNzjWXs3fCxjx+PVR/JHpztU6Uk8qsi+uFdQ6XNBcU=; b=M7pnIPf+Pq6jzqX0nWN6inEKJ76P76R3DR67P4P78RAB7RTnDZ/Y3WOh07CNLb/GblA/4H 8us2O57PmeZSrXQ4xhsFlRv+AyjmAsYOwgMTiMTrEYwxwoH1frlQEsgqsDwl1ncki0VVI8 OUfAxYYxyKH+L5+ZRZVU+MQ9K+5Bexs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-196-VNQ_qnwZMhu9M2ICFtPKHQ-1; Wed, 20 Dec 2023 17:45:38 -0500 X-MC-Unique: VNQ_qnwZMhu9M2ICFtPKHQ-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 33DEF185A780; Wed, 20 Dec 2023 22:45:38 +0000 (UTC) Received: from t14s.fritz.box (unknown [10.39.192.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5D67340C6EB9; Wed, 20 Dec 2023 22:45:36 +0000 (UTC) From: David Hildenbrand <david@redhat.com> To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand <david@redhat.com>, Andrew Morton <akpm@linux-foundation.org>, "Matthew Wilcox (Oracle)" <willy@infradead.org>, Hugh Dickins <hughd@google.com>, Ryan Roberts <ryan.roberts@arm.com>, Yin Fengwei <fengwei.yin@intel.com>, Mike Kravetz <mike.kravetz@oracle.com>, Muchun Song <muchun.song@linux.dev>, Peter Xu <peterx@redhat.com> Subject: [PATCH v2 12/40] mm/rmap: remove page_add_file_rmap() Date: Wed, 20 Dec 2023 23:44:36 +0100 Message-ID: <20231220224504.646757-13-david@redhat.com> In-Reply-To: <20231220224504.646757-1-david@redhat.com> References: <20231220224504.646757-1-david@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Rsp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c+aTASjx 2gS4+KtT NNO/iQSsxAU4sMdkXNYLjMmryxBgz2suj9R4dE3piFPLkUvh5w1awutiD2k6y0mC+1WG1Bah4RsrYLYiXlMvL1N76eKvoAyGJ6HmCJKdastJBleJ4g690gVdQnayaZxvNYrDVEzY+KoOanUPROE/Lo2QYw7G9BRV8+2wkZujWoN7J9A33A00qKBMJ6rcE+OcnteiAQ3KF03obOi/DUiXBbxHggEe0KvSLU69RntXPHV05aoNfzMzbqy9qQVFw3bqvxxiJ3RVvVxvxhksl8Mp+iEdKdEdWF/5SyNRR2FRAdwDICIM= 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm/rmap: interface overhaul
|
expand
|
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 3d86a76b28368..6a4db6933e7df 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h @@ -237,8 +237,6 @@ void page_add_anon_rmap(struct page *, struct vm_area_struct *, unsigned long address, rmap_t flags); void folio_add_new_anon_rmap(struct folio *, struct vm_area_struct *, unsigned long address); -void page_add_file_rmap(struct page *, struct vm_area_struct *, - bool compound); void folio_add_file_rmap_ptes(struct folio *, struct page *, int nr_pages, struct vm_area_struct *); #define folio_add_file_rmap_pte(folio, page, vma) \ diff --git a/mm/rmap.c b/mm/rmap.c index cc1fc2d570f0d..5ab5ef10fbf5e 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -1467,27 +1467,6 @@ void folio_add_file_rmap_pmd(struct folio *folio, struct page *page, #endif } -/** - * page_add_file_rmap - add pte mapping to a file page - * @page: the page to add the mapping to - * @vma: the vm area in which the mapping is added - * @compound: charge the page as compound or small page - * - * The caller needs to hold the pte lock. - */ -void page_add_file_rmap(struct page *page, struct vm_area_struct *vma, - bool compound) -{ - struct folio *folio = page_folio(page); - - VM_WARN_ON_ONCE_PAGE(compound && !PageTransHuge(page), page); - - if (likely(!compound)) - folio_add_file_rmap_pte(folio, page, vma); - else - folio_add_file_rmap_pmd(folio, page, vma); -} - /** * page_remove_rmap - take down pte mapping from a page * @page: page to remove mapping from