diff mbox series

[v1,12/39] mm/rmap: remove page_add_file_rmap()

Message ID 20231211155652.131054-13-david@redhat.com (mailing list archive)
State New
Headers show
Series mm/rmap: interface overhaul | expand

Commit Message

David Hildenbrand Dec. 11, 2023, 3:56 p.m. UTC
All users are gone, let's remove it.

Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
---
 include/linux/rmap.h |  2 --
 mm/rmap.c            | 21 ---------------------
 2 files changed, 23 deletions(-)

Comments

Ryan Roberts Dec. 18, 2023, 4 p.m. UTC | #1
On 11/12/2023 15:56, David Hildenbrand wrote:
> All users are gone, let's remove it.
> 
> Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
> Signed-off-by: David Hildenbrand <david@redhat.com>

Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>

> ---
>  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 1753900f4aed..7198905dc8be 100644
> --- a/include/linux/rmap.h
> +++ b/include/linux/rmap.h
> @@ -240,8 +240,6 @@ void page_add_new_anon_rmap(struct page *, struct vm_area_struct *,
>  		unsigned long address);
>  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 4f30930a1162..2ff2f11275e5 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
diff mbox series

Patch

diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 1753900f4aed..7198905dc8be 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -240,8 +240,6 @@  void page_add_new_anon_rmap(struct page *, struct vm_area_struct *,
 		unsigned long address);
 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 4f30930a1162..2ff2f11275e5 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