[PATCH] mm: Remove unused page_is_file_lru() function

Ye Liu posted 1 patch 1 week, 4 days ago
include/linux/mm_inline.h | 5 -----
1 file changed, 5 deletions(-)
[PATCH] mm: Remove unused page_is_file_lru() function
Posted by Ye Liu 1 week, 4 days ago
From: Ye Liu <liuye@kylinos.cn>

The page_is_file_lru() wrapper function is no longer used. The kernel
has moved to folio-based APIs, and all callers should use
folio_is_file_lru() instead.

Remove the obsolete page-based wrapper function.

Signed-off-by: Ye Liu <liuye@kylinos.cn>
---
 include/linux/mm_inline.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
index ad50688d89db..4fa480bf1dd2 100644
--- a/include/linux/mm_inline.h
+++ b/include/linux/mm_inline.h
@@ -30,11 +30,6 @@ static inline int folio_is_file_lru(const struct folio *folio)
 	return !folio_test_swapbacked(folio);
 }
 
-static inline int page_is_file_lru(struct page *page)
-{
-	return folio_is_file_lru(page_folio(page));
-}
-
 static __always_inline void __update_lru_size(struct lruvec *lruvec,
 				enum lru_list lru, enum zone_type zid,
 				long nr_pages)
-- 
2.43.0
Re: [PATCH] mm: Remove unused page_is_file_lru() function
Posted by Lorenzo Stoakes (Oracle) 1 week, 4 days ago
On Mon, Mar 23, 2026 at 05:03:04PM +0800, Ye Liu wrote:
> From: Ye Liu <liuye@kylinos.cn>
>
> The page_is_file_lru() wrapper function is no longer used. The kernel
> has moved to folio-based APIs, and all callers should use
> folio_is_file_lru() instead.
>
> Remove the obsolete page-based wrapper function.
>
> Signed-off-by: Ye Liu <liuye@kylinos.cn>

LGTM, so:

Reviewed-by: Lorenzo Stoakes (Oracle) <ljs@kernel.org>

> ---
>  include/linux/mm_inline.h | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
> index ad50688d89db..4fa480bf1dd2 100644
> --- a/include/linux/mm_inline.h
> +++ b/include/linux/mm_inline.h
> @@ -30,11 +30,6 @@ static inline int folio_is_file_lru(const struct folio *folio)
>  	return !folio_test_swapbacked(folio);
>  }
>
> -static inline int page_is_file_lru(struct page *page)
> -{
> -	return folio_is_file_lru(page_folio(page));
> -}
> -
>  static __always_inline void __update_lru_size(struct lruvec *lruvec,
>  				enum lru_list lru, enum zone_type zid,
>  				long nr_pages)
> --
> 2.43.0
>

Thanks, Lorenzo
Re: [PATCH] mm: Remove unused page_is_file_lru() function
Posted by David Hildenbrand (Arm) 1 week, 4 days ago
On 3/23/26 10:03, Ye Liu wrote:
> From: Ye Liu <liuye@kylinos.cn>
> 
> The page_is_file_lru() wrapper function is no longer used. The kernel
> has moved to folio-based APIs, and all callers should use
> folio_is_file_lru() instead.
> 
> Remove the obsolete page-based wrapper function.
> 
> Signed-off-by: Ye Liu <liuye@kylinos.cn>
> ---

Acked-by: David Hildenbrand (Arm) <david@kernel.org>

-- 
Cheers,

David