Received: by 2002:a05:7412:a9a8:b0:f9:92ae:e617 with SMTP id o40csp24119rdh; Wed, 20 Dec 2023 14:48:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IGJxbC10xl6pcTKWzubs6xgYUbIIa0PYFVUfbZ/wbAV+Wkb19niOHKY0/XRvpI7aH5Ml4X3 X-Received: by 2002:a05:6808:2e4f:b0:3ba:1a6:f0f3 with SMTP id gp15-20020a0568082e4f00b003ba01a6f0f3mr27595037oib.65.1703112490314; Wed, 20 Dec 2023 14:48:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703112490; cv=none; d=google.com; s=arc-20160816; b=JNEO3/dRMT1tlRZcwNnK1vQDHgqRG2/UYzxuYOnYIo0GX3uQRc8Tl16Q6HxUcV2A0D pszWvRkbwXU0JMtHBrZhomhq6iKIGOp2iHpUYbOg1507ZP9HllfiDHvnglTS6UkBQ75p TZj6lxC++aMI9ztEM665gUN/x/GLwyNRikILcE17zhJboUBpWvQLBNpKh+0clwy/blvd 8YR7SY0KCtbN3PvK5c35t7n/AxXNVrTUOxd1m9mnkGHx3jQLRdmx2q0rwAAoSbhzJt07 XzRc9CiukIMyrEXxTS52qUTi3L4B9QeROAlKukK1CpOZAa3gluxrITgJks7YLLZxQTjl Yu7g== 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=ylNzjWXs3fCxjx+PVR/JHpztU6Uk8qsi+uFdQ6XNBcU=; fh=UlFXU+hKOMcm6idRzNfe3Pu+B5L1f7aeir3C6i/NWQA=; b=wttd2QJ11vYAq7xTl2iZ9LrJGuMoe6n/1u9FIh6yn+bDb9iKLvJ5XjKtclZwU8mgz3 5/qk0rZ38F+9gtWcZ/zJOdZ/y5DODCQBrIeSxbcuUnS1h2KzwpPbO/qeKMphHSoObidG YA2zZgFjF7h2YSDrUnxofoPOecR3PftFB/ZqxzeQP2nrezd05qPvBQXofS2bCIJirFf4 q6060PV67L40YQt42VyuA+LM5nhUie6GaD1bUBhKZAQIGKyW6YCgT1uTWFeIlp0qC8iZ hpsn7ySW8NRGGuYlXtGkGZ2VDzdMg5G24eY4pCdUYwSDG8g5zN92hrc6iUejTdJY7Zds 51+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=M7pnIPf+; spf=pass (google.com: domain of linux-kernel+bounces-7537-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7537-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id z8-20020ac87f88000000b0042581e4d6f6si743726qtj.547.2023.12.20.14.48.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 14:48:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7537-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=M7pnIPf+; spf=pass (google.com: domain of linux-kernel+bounces-7537-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7537-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 080051C231C5 for ; Wed, 20 Dec 2023 22:48:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 446144D127; Wed, 20 Dec 2023 22:45:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="M7pnIPf+" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 19E3B4CE14 for ; Wed, 20 Dec 2023 22:45:42 +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=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 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 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> 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, let's remove it. Reviewed-by: Yin Fengwei Reviewed-by: Ryan Roberts Signed-off-by: David Hildenbrand --- include/linux/rmap.h | 2 -- mm/rmap.c | 21 --------------------- 2 files changed, 23 deletions(-) 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 -- 2.43.0