diff mbox series

[v4,29/36] mm: Remove page_mapping_file()

Message ID 20230315051444.3229621-30-willy@infradead.org (mailing list archive)
State New
Headers show
Series New page table range API | expand

Commit Message

Matthew Wilcox March 15, 2023, 5:14 a.m. UTC
This function has no more users.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 include/linux/pagemap.h | 8 --------
 1 file changed, 8 deletions(-)

Comments

Anshuman Khandual May 25, 2023, 3:50 a.m. UTC | #1
On 3/15/23 10:44, Matthew Wilcox (Oracle) wrote:
> This function has no more users.

On v6.4-rc3, there are still some users. Am I looking into a wrong
tree/branch/tag ?

~/workplace/linux$ git grep page_mapping_file
arch/arc/mm/cache.c:    mapping = page_mapping_file(page);
arch/arm/mm/copypage-v4mc.c:            __flush_dcache_page(page_mapping_file(from), from);
arch/arm/mm/copypage-v6.c:              __flush_dcache_page(page_mapping_file(from), from);
arch/arm/mm/copypage-xscale.c:          __flush_dcache_page(page_mapping_file(from), from);
arch/arm/mm/fault-armv.c:       mapping = page_mapping_file(page);
arch/arm/mm/flush.c:            mapping = page_mapping_file(page);
arch/arm/mm/flush.c:    mapping = page_mapping_file(page);
arch/csky/abiv1/cacheflush.c:   mapping = page_mapping_file(page);
arch/csky/abiv1/cacheflush.c:   if (page_mapping_file(page)) {
arch/mips/mm/cache.c:   struct address_space *mapping = page_mapping_file(page);
arch/nios2/mm/cacheflush.c:     mapping = page_mapping_file(page);
arch/nios2/mm/cacheflush.c:     mapping = page_mapping_file(page);
arch/parisc/kernel/cache.c:     if (page_mapping_file(page) &&
arch/parisc/kernel/cache.c:     struct address_space *mapping = page_mapping_file(page);
arch/sh/mm/cache-sh4.c: struct address_space *mapping = page_mapping_file(page);
arch/sh/mm/cache-sh7705.c:      struct address_space *mapping = page_mapping_file(page);
arch/sparc/kernel/smp_64.c:                          page_mapping_file(page) != NULL));
arch/sparc/kernel/smp_64.c:     if (page_mapping_file(page) != NULL &&
arch/sparc/kernel/smp_64.c:                     if (page_mapping_file(page) != NULL)
arch/sparc/kernel/smp_64.c:             if (page_mapping_file(page) != NULL)
arch/sparc/mm/init_64.c:                             page_mapping_file(page) != NULL));
arch/sparc/mm/init_64.c:        if (page_mapping_file(page) != NULL &&
arch/sparc/mm/init_64.c:        mapping = page_mapping_file(page);
arch/sparc/mm/tlb.c:            mapping = page_mapping_file(page);
arch/xtensa/mm/cache.c: struct address_space *mapping = page_mapping_file(page);

> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> ---
>  include/linux/pagemap.h | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> index e56c2023aa0e..a87113055b9c 100644
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@ -394,14 +394,6 @@ static inline struct address_space *page_file_mapping(struct page *page)
>  	return folio_file_mapping(page_folio(page));
>  }
>  
> -/*
> - * For file cache pages, return the address_space, otherwise return NULL
> - */
> -static inline struct address_space *page_mapping_file(struct page *page)
> -{
> -	return folio_flush_mapping(page_folio(page));
> -}
> -
>  /**
>   * folio_inode - Get the host inode for this folio.
>   * @folio: The folio.
Matthew Wilcox May 25, 2023, 4:03 a.m. UTC | #2
On Thu, May 25, 2023 at 09:20:47AM +0530, Anshuman Khandual wrote:
> 
> 
> On 3/15/23 10:44, Matthew Wilcox (Oracle) wrote:
> > This function has no more users.
> 
> On v6.4-rc3, there are still some users. Am I looking into a wrong
> tree/branch/tag ?

Did you apply patches 1-28 before grepping?
Anshuman Khandual May 25, 2023, 4:46 a.m. UTC | #3
On 5/25/23 09:33, Matthew Wilcox wrote:
> On Thu, May 25, 2023 at 09:20:47AM +0530, Anshuman Khandual wrote:
>>
>>
>> On 3/15/23 10:44, Matthew Wilcox (Oracle) wrote:
>>> This function has no more users.
>>
>> On v6.4-rc3, there are still some users. Am I looking into a wrong
>> tree/branch/tag ?
> 
> Did you apply patches 1-28 before grepping?

Ahh, my bad. I had applied the generic MM ones and arm64 one to test.
Anshuman Khandual May 25, 2023, 5:37 a.m. UTC | #4
On 3/15/23 10:44, Matthew Wilcox (Oracle) wrote:
> This function has no more users.
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>

Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>

> ---
>  include/linux/pagemap.h | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> index e56c2023aa0e..a87113055b9c 100644
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@ -394,14 +394,6 @@ static inline struct address_space *page_file_mapping(struct page *page)
>  	return folio_file_mapping(page_folio(page));
>  }
>  
> -/*
> - * For file cache pages, return the address_space, otherwise return NULL
> - */
> -static inline struct address_space *page_mapping_file(struct page *page)
> -{
> -	return folio_flush_mapping(page_folio(page));
> -}
> -
>  /**
>   * folio_inode - Get the host inode for this folio.
>   * @folio: The folio.
diff mbox series

Patch

diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index e56c2023aa0e..a87113055b9c 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -394,14 +394,6 @@  static inline struct address_space *page_file_mapping(struct page *page)
 	return folio_file_mapping(page_folio(page));
 }
 
-/*
- * For file cache pages, return the address_space, otherwise return NULL
- */
-static inline struct address_space *page_mapping_file(struct page *page)
-{
-	return folio_flush_mapping(page_folio(page));
-}
-
 /**
  * folio_inode - Get the host inode for this folio.
  * @folio: The folio.