mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH mm-new v2 0/5] mm: remove unused functions
@ 2026-11-17  7:16 Shivank Garg
  2026-11-17  7:16 ` [PATCH mm-new v2 1/5] mm: remove unused helpers from pagemap.h Shivank Garg
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Shivank Garg @ 2026-11-17  7:16 UTC (permalink / raw)
  To: Matthew Wilcox (Oracle),
	Jan Kara, Andrew Morton, Chris Li, Kairui Song, Kemeng Shi,
	Nhat Pham, Baoquan He, Barry Song, Youngjun Park, Minchan Kim,
	Sergey Senozhatsky, Liam R. Howlett, Lorenzo Stoakes,
	Vlastimil Babka, Jann Horn, Pedro Falcato
  Cc: linux-fsdevel, linux-mm, linux-kernel, Shivank Garg

This series removes five functions and one variable in mm that have no
users left anywhere in the tree. I found them with the kunused scripts
[1], which I wrote with LLM's help. The v1 cover letter [2] has more
details on the scripts and how LLM was used.

Changes in v2:
- Split v1 [2] up by MM tree, as David suggested. These five patches
  are based on mm-new. 
- No changes to the patches themselves.

[1] https://github.com/AMDESE/linux-mm/tree/shivank/kunused
[2] https://lore.kernel.org/r/20261026-unused-sym-v1-0-82ca2dceabe1@amd.com

Signed-off-by: Shivank Garg <shivankg@amd.com>
---
Shivank Garg (5):
      mm: remove unused helpers from pagemap.h
      mm/swapops: remove unused make_guard_swp_entry()
      mm/swap: remove unused folio_to_swp_tb()
      mm/zsmalloc: remove unused zpdesc_lock()
      mm: nommu: remove unused heap_stack_gap

 include/linux/pagemap.h | 11 -----------
 include/linux/swapops.h |  5 -----
 mm/nommu.c              |  1 -
 mm/swap_table.h         |  5 -----
 mm/zpdesc.h             |  5 -----
 5 files changed, 27 deletions(-)
---
base-commit: 67f3b04b277373438f17300e056306adbd9edf7b
change-id: 20261109-unused-sym-mm-8fa76462573e

Best regards,
-- 
Shivank Garg <shivankg@amd.com>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH mm-new v2 1/5] mm: remove unused helpers from pagemap.h
  2026-11-17  7:16 [PATCH mm-new v2 0/5] mm: remove unused functions Shivank Garg
@ 2026-11-17  7:16 ` Shivank Garg
  2026-11-17 10:01   ` Barry Song
  2026-11-18 16:11   ` Dev Jain
  2026-11-17  7:16 ` [PATCH mm-new v2 2/5] mm/swapops: remove unused make_guard_swp_entry() Shivank Garg
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 14+ messages in thread
From: Shivank Garg @ 2026-11-17  7:16 UTC (permalink / raw)
  To: Matthew Wilcox (Oracle),
	Jan Kara, Andrew Morton, Chris Li, Kairui Song, Kemeng Shi,
	Nhat Pham, Baoquan He, Barry Song, Youngjun Park, Minchan Kim,
	Sergey Senozhatsky, Liam R. Howlett, Lorenzo Stoakes,
	Vlastimil Babka, Jann Horn, Pedro Falcato
  Cc: linux-fsdevel, linux-mm, linux-kernel, Shivank Garg

invalidate_remote_inode() lost its last user in commit d73065e60dcc
("afs: Use alternative invalidation to using launder_folio").
mapping_clear_release_always() has no callers.

Signed-off-by: Shivank Garg <shivankg@amd.com>
---
 include/linux/pagemap.h | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 73af18a37367..e681a7ba6642 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -20,12 +20,6 @@ struct folio_batch;
 unsigned long invalidate_mapping_pages(struct address_space *mapping,
 					pgoff_t start, pgoff_t end);
 
-static inline void invalidate_remote_inode(struct inode *inode)
-{
-	if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
-	    S_ISLNK(inode->i_mode))
-		invalidate_mapping_pages(inode->i_mapping, 0, -1);
-}
 int invalidate_inode_pages2(struct address_space *mapping);
 int invalidate_inode_pages2_range(struct address_space *mapping,
 		pgoff_t start, pgoff_t end);
@@ -298,11 +292,6 @@ static inline void mapping_set_release_always(struct address_space *mapping)
 	set_bit(AS_RELEASE_ALWAYS, &mapping->flags);
 }
 
-static inline void mapping_clear_release_always(struct address_space *mapping)
-{
-	clear_bit(AS_RELEASE_ALWAYS, &mapping->flags);
-}
-
 static inline bool mapping_stable_writes(const struct address_space *mapping)
 {
 	return test_bit(AS_STABLE_WRITES, &mapping->flags);

-- 
2.53.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH mm-new v2 2/5] mm/swapops: remove unused make_guard_swp_entry()
  2026-11-17  7:16 [PATCH mm-new v2 0/5] mm: remove unused functions Shivank Garg
  2026-11-17  7:16 ` [PATCH mm-new v2 1/5] mm: remove unused helpers from pagemap.h Shivank Garg
@ 2026-11-17  7:16 ` Shivank Garg
  2026-11-17 10:02   ` Barry Song
  2026-11-17  7:16 ` [PATCH mm-new v2 3/5] mm/swap: remove unused folio_to_swp_tb() Shivank Garg
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Shivank Garg @ 2026-11-17  7:16 UTC (permalink / raw)
  To: Matthew Wilcox (Oracle),
	Jan Kara, Andrew Morton, Chris Li, Kairui Song, Kemeng Shi,
	Nhat Pham, Baoquan He, Barry Song, Youngjun Park, Minchan Kim,
	Sergey Senozhatsky, Liam R. Howlett, Lorenzo Stoakes,
	Vlastimil Babka, Jann Horn, Pedro Falcato
  Cc: linux-fsdevel, linux-mm, linux-kernel, Shivank Garg

make_guard_swp_entry() has no callers.

Signed-off-by: Shivank Garg <shivankg@amd.com>
---
 include/linux/swapops.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/include/linux/swapops.h b/include/linux/swapops.h
index 603f9e3f909c..6f62fc3c8cfa 100644
--- a/include/linux/swapops.h
+++ b/include/linux/swapops.h
@@ -306,11 +306,6 @@ static inline swp_entry_t make_poisoned_swp_entry(void)
 	return make_pte_marker_entry(PTE_MARKER_POISONED);
 }
 
-static inline swp_entry_t make_guard_swp_entry(void)
-{
-	return make_pte_marker_entry(PTE_MARKER_GUARD);
-}
-
 struct page_vma_mapped_walk;
 
 #ifdef CONFIG_ARCH_HAS_PMD_SOFTLEAVES

-- 
2.53.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH mm-new v2 3/5] mm/swap: remove unused folio_to_swp_tb()
  2026-11-17  7:16 [PATCH mm-new v2 0/5] mm: remove unused functions Shivank Garg
  2026-11-17  7:16 ` [PATCH mm-new v2 1/5] mm: remove unused helpers from pagemap.h Shivank Garg
  2026-11-17  7:16 ` [PATCH mm-new v2 2/5] mm/swapops: remove unused make_guard_swp_entry() Shivank Garg
@ 2026-11-17  7:16 ` Shivank Garg
  2026-11-17 10:03   ` Barry Song
  2026-11-18 16:13   ` Dev Jain
  2026-11-17  7:16 ` [PATCH mm-new v2 4/5] mm/zsmalloc: remove unused zpdesc_lock() Shivank Garg
  2026-11-17  7:16 ` [PATCH mm-new v2 5/5] mm: nommu: remove unused heap_stack_gap Shivank Garg
  4 siblings, 2 replies; 14+ messages in thread
From: Shivank Garg @ 2026-11-17  7:16 UTC (permalink / raw)
  To: Matthew Wilcox (Oracle),
	Jan Kara, Andrew Morton, Chris Li, Kairui Song, Kemeng Shi,
	Nhat Pham, Baoquan He, Barry Song, Youngjun Park, Minchan Kim,
	Sergey Senozhatsky, Liam R. Howlett, Lorenzo Stoakes,
	Vlastimil Babka, Jann Horn, Pedro Falcato
  Cc: linux-fsdevel, linux-mm, linux-kernel, Shivank Garg

Its last users were removed in commit 0d6af9bcf383 ("mm, swap: use the
swap table to track the swap count").

Signed-off-by: Shivank Garg <shivankg@amd.com>
---
 mm/swap_table.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/mm/swap_table.h b/mm/swap_table.h
index 072625d60d54..022d2251884e 100644
--- a/mm/swap_table.h
+++ b/mm/swap_table.h
@@ -135,11 +135,6 @@ static inline unsigned long pfn_to_swp_tb(unsigned long pfn, unsigned char flags
 	return swp_tb | __flags_to_swp_tb(flags);
 }
 
-static inline unsigned long folio_to_swp_tb(struct folio *folio, unsigned char flags)
-{
-	return pfn_to_swp_tb(folio_pfn(folio), flags);
-}
-
 static inline unsigned long shadow_to_swp_tb(void *shadow, unsigned char flags)
 {
 	BUILD_BUG_ON((BITS_PER_XA_VALUE + 1) !=

-- 
2.53.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH mm-new v2 4/5] mm/zsmalloc: remove unused zpdesc_lock()
  2026-11-17  7:16 [PATCH mm-new v2 0/5] mm: remove unused functions Shivank Garg
                   ` (2 preceding siblings ...)
  2026-11-17  7:16 ` [PATCH mm-new v2 3/5] mm/swap: remove unused folio_to_swp_tb() Shivank Garg
@ 2026-11-17  7:16 ` Shivank Garg
  2026-11-17 10:04   ` Barry Song
  2026-11-18  2:17   ` Sergey Senozhatsky
  2026-11-17  7:16 ` [PATCH mm-new v2 5/5] mm: nommu: remove unused heap_stack_gap Shivank Garg
  4 siblings, 2 replies; 14+ messages in thread
From: Shivank Garg @ 2026-11-17  7:16 UTC (permalink / raw)
  To: Matthew Wilcox (Oracle),
	Jan Kara, Andrew Morton, Chris Li, Kairui Song, Kemeng Shi,
	Nhat Pham, Baoquan He, Barry Song, Youngjun Park, Minchan Kim,
	Sergey Senozhatsky, Liam R. Howlett, Lorenzo Stoakes,
	Vlastimil Babka, Jann Horn, Pedro Falcato
  Cc: linux-fsdevel, linux-mm, linux-kernel, Shivank Garg

It was added in commit c1b3bb73d55e ("mm/zsmalloc: use zpdesc in
trylock_zspage()/lock_zspage()") but has never had a caller.

Signed-off-by: Shivank Garg <shivankg@amd.com>
---
 mm/zpdesc.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/mm/zpdesc.h b/mm/zpdesc.h
index 4fd81c2e8076..aaab5f1bfb52 100644
--- a/mm/zpdesc.h
+++ b/mm/zpdesc.h
@@ -107,11 +107,6 @@ static_assert(sizeof(struct zpdesc) <= sizeof(struct page));
 	const struct page *:		(const struct zpdesc *)(p),	\
 	struct page *:			(struct zpdesc *)(p)))
 
-static inline void zpdesc_lock(struct zpdesc *zpdesc)
-{
-	folio_lock(zpdesc_folio(zpdesc));
-}
-
 static inline bool zpdesc_trylock(struct zpdesc *zpdesc)
 {
 	return folio_trylock(zpdesc_folio(zpdesc));

-- 
2.53.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH mm-new v2 5/5] mm: nommu: remove unused heap_stack_gap
  2026-11-17  7:16 [PATCH mm-new v2 0/5] mm: remove unused functions Shivank Garg
                   ` (3 preceding siblings ...)
  2026-11-17  7:16 ` [PATCH mm-new v2 4/5] mm/zsmalloc: remove unused zpdesc_lock() Shivank Garg
@ 2026-11-17  7:16 ` Shivank Garg
  2026-11-17 10:07   ` Barry Song
  4 siblings, 1 reply; 14+ messages in thread
From: Shivank Garg @ 2026-11-17  7:16 UTC (permalink / raw)
  To: Matthew Wilcox (Oracle),
	Jan Kara, Andrew Morton, Chris Li, Kairui Song, Kemeng Shi,
	Nhat Pham, Baoquan He, Barry Song, Youngjun Park, Minchan Kim,
	Sergey Senozhatsky, Liam R. Howlett, Lorenzo Stoakes,
	Vlastimil Babka, Jann Horn, Pedro Falcato
  Cc: linux-fsdevel, linux-mm, linux-kernel, Shivank Garg

heap_stack_gap has been unused since at least the start of git history,
commit 1da177e4c3f4 ("Linux-2.6.12-rc2").

Link: https://lore.kernel.org/linux-mm/20140430083620.GA4711@dhcp22.suse.cz/
Signed-off-by: Shivank Garg <shivankg@amd.com>
---
 mm/nommu.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/nommu.c b/mm/nommu.c
index df99495c8902..a971c12f2732 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -43,7 +43,6 @@
 #include "internal.h"
 
 unsigned long highest_memmap_pfn;
-int heap_stack_gap = 0;
 
 atomic_long_t mmap_pages_allocated;
 

-- 
2.53.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH mm-new v2 1/5] mm: remove unused helpers from pagemap.h
  2026-11-17  7:16 ` [PATCH mm-new v2 1/5] mm: remove unused helpers from pagemap.h Shivank Garg
@ 2026-11-17 10:01   ` Barry Song
  2026-11-18 16:11   ` Dev Jain
  1 sibling, 0 replies; 14+ messages in thread
From: Barry Song @ 2026-11-17 10:01 UTC (permalink / raw)
  To: Shivank Garg
  Cc: Matthew Wilcox (Oracle),
	Jan Kara, Andrew Morton, Chris Li, Kairui Song, Kemeng Shi,
	Nhat Pham, Baoquan He, Youngjun Park, Minchan Kim,
	Sergey Senozhatsky, Liam R. Howlett, Lorenzo Stoakes,
	Vlastimil Babka, Jann Horn, Pedro Falcato, linux-fsdevel,
	linux-mm, linux-kernel

On Tue, Nov 17, 2026 at 3:17 PM Shivank Garg <shivankg@amd.com> wrote:
>
> invalidate_remote_inode() lost its last user in commit d73065e60dcc
> ("afs: Use alternative invalidation to using launder_folio").
> mapping_clear_release_always() has no callers.
>
> Signed-off-by: Shivank Garg <shivankg@amd.com>
> ---

Reviewed-by: Barry Song <baohua@kernel.org>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH mm-new v2 2/5] mm/swapops: remove unused make_guard_swp_entry()
  2026-11-17  7:16 ` [PATCH mm-new v2 2/5] mm/swapops: remove unused make_guard_swp_entry() Shivank Garg
@ 2026-11-17 10:02   ` Barry Song
  0 siblings, 0 replies; 14+ messages in thread
From: Barry Song @ 2026-11-17 10:02 UTC (permalink / raw)
  To: Shivank Garg
  Cc: Matthew Wilcox (Oracle),
	Jan Kara, Andrew Morton, Chris Li, Kairui Song, Kemeng Shi,
	Nhat Pham, Baoquan He, Youngjun Park, Minchan Kim,
	Sergey Senozhatsky, Liam R. Howlett, Lorenzo Stoakes,
	Vlastimil Babka, Jann Horn, Pedro Falcato, linux-fsdevel,
	linux-mm, linux-kernel

On Tue, Nov 17, 2026 at 3:17 PM Shivank Garg <shivankg@amd.com> wrote:
>
> make_guard_swp_entry() has no callers.
>
> Signed-off-by: Shivank Garg <shivankg@amd.com>
> ---
>  include/linux/swapops.h | 5 -----
>  1 file changed, 5 deletions(-)
>

Reviewed-by: Barry Song <baohua@kernel.org>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH mm-new v2 3/5] mm/swap: remove unused folio_to_swp_tb()
  2026-11-17  7:16 ` [PATCH mm-new v2 3/5] mm/swap: remove unused folio_to_swp_tb() Shivank Garg
@ 2026-11-17 10:03   ` Barry Song
  2026-11-18 16:13   ` Dev Jain
  1 sibling, 0 replies; 14+ messages in thread
From: Barry Song @ 2026-11-17 10:03 UTC (permalink / raw)
  To: Shivank Garg
  Cc: Matthew Wilcox (Oracle),
	Jan Kara, Andrew Morton, Chris Li, Kairui Song, Kemeng Shi,
	Nhat Pham, Baoquan He, Youngjun Park, Minchan Kim,
	Sergey Senozhatsky, Liam R. Howlett, Lorenzo Stoakes,
	Vlastimil Babka, Jann Horn, Pedro Falcato, linux-fsdevel,
	linux-mm, linux-kernel

On Tue, Nov 17, 2026 at 3:17 PM Shivank Garg <shivankg@amd.com> wrote:
>
> Its last users were removed in commit 0d6af9bcf383 ("mm, swap: use the
> swap table to track the swap count").
>
> Signed-off-by: Shivank Garg <shivankg@amd.com>
> ---

Reviewed-by: Barry Song <baohua@kernel.org>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH mm-new v2 4/5] mm/zsmalloc: remove unused zpdesc_lock()
  2026-11-17  7:16 ` [PATCH mm-new v2 4/5] mm/zsmalloc: remove unused zpdesc_lock() Shivank Garg
@ 2026-11-17 10:04   ` Barry Song
  2026-11-18  2:17   ` Sergey Senozhatsky
  1 sibling, 0 replies; 14+ messages in thread
From: Barry Song @ 2026-11-17 10:04 UTC (permalink / raw)
  To: Shivank Garg
  Cc: Matthew Wilcox (Oracle),
	Jan Kara, Andrew Morton, Chris Li, Kairui Song, Kemeng Shi,
	Nhat Pham, Baoquan He, Youngjun Park, Minchan Kim,
	Sergey Senozhatsky, Liam R. Howlett, Lorenzo Stoakes,
	Vlastimil Babka, Jann Horn, Pedro Falcato, linux-fsdevel,
	linux-mm, linux-kernel

On Tue, Nov 17, 2026 at 3:17 PM Shivank Garg <shivankg@amd.com> wrote:
>
> It was added in commit c1b3bb73d55e ("mm/zsmalloc: use zpdesc in
> trylock_zspage()/lock_zspage()") but has never had a caller.
>
> Signed-off-by: Shivank Garg <shivankg@amd.com>
> ---
>  mm/zpdesc.h | 5 -----
>  1 file changed, 5 deletions(-)

Reviewed-by: Barry Song <baohua@kernel.org>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH mm-new v2 5/5] mm: nommu: remove unused heap_stack_gap
  2026-11-17  7:16 ` [PATCH mm-new v2 5/5] mm: nommu: remove unused heap_stack_gap Shivank Garg
@ 2026-11-17 10:07   ` Barry Song
  0 siblings, 0 replies; 14+ messages in thread
From: Barry Song @ 2026-11-17 10:07 UTC (permalink / raw)
  To: Shivank Garg
  Cc: Matthew Wilcox (Oracle),
	Jan Kara, Andrew Morton, Chris Li, Kairui Song, Kemeng Shi,
	Nhat Pham, Baoquan He, Youngjun Park, Minchan Kim,
	Sergey Senozhatsky, Liam R. Howlett, Lorenzo Stoakes,
	Vlastimil Babka, Jann Horn, Pedro Falcato, linux-fsdevel,
	linux-mm, linux-kernel

On Tue, Nov 17, 2026 at 3:17 PM Shivank Garg <shivankg@amd.com> wrote:
>
> heap_stack_gap has been unused since at least the start of git history,
> commit 1da177e4c3f4 ("Linux-2.6.12-rc2").
>
> Link: https://lore.kernel.org/linux-mm/20140430083620.GA4711@dhcp22.suse.cz/
> Signed-off-by: Shivank Garg <shivankg@amd.com>
> ---
>  mm/nommu.c | 1 -
>  1 file changed, 1 deletion(-)

Reviewed-by: Barry Song <baohua@kernel.org>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH mm-new v2 4/5] mm/zsmalloc: remove unused zpdesc_lock()
  2026-11-17  7:16 ` [PATCH mm-new v2 4/5] mm/zsmalloc: remove unused zpdesc_lock() Shivank Garg
  2026-11-17 10:04   ` Barry Song
@ 2026-11-18  2:17   ` Sergey Senozhatsky
  1 sibling, 0 replies; 14+ messages in thread
From: Sergey Senozhatsky @ 2026-11-18  2:17 UTC (permalink / raw)
  To: Shivank Garg
  Cc: Matthew Wilcox (Oracle),
	Jan Kara, Andrew Morton, Chris Li, Kairui Song, Kemeng Shi,
	Nhat Pham, Baoquan He, Barry Song, Youngjun Park, Minchan Kim,
	Sergey Senozhatsky, Liam R. Howlett, Lorenzo Stoakes,
	Vlastimil Babka, Jann Horn, Pedro Falcato, linux-fsdevel,
	linux-mm, linux-kernel

On (26/11/17 07:16), Shivank Garg wrote:
> It was added in commit c1b3bb73d55e ("mm/zsmalloc: use zpdesc in
> trylock_zspage()/lock_zspage()") but has never had a caller.
> 
> Signed-off-by: Shivank Garg <shivankg@amd.com>

Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH mm-new v2 1/5] mm: remove unused helpers from pagemap.h
  2026-11-17  7:16 ` [PATCH mm-new v2 1/5] mm: remove unused helpers from pagemap.h Shivank Garg
  2026-11-17 10:01   ` Barry Song
@ 2026-11-18 16:11   ` Dev Jain
  1 sibling, 0 replies; 14+ messages in thread
From: Dev Jain @ 2026-11-18 16:11 UTC (permalink / raw)
  To: Shivank Garg, Matthew Wilcox (Oracle),
	Jan Kara, Andrew Morton, Chris Li, Kairui Song, Kemeng Shi,
	Nhat Pham, Baoquan He, Barry Song, Youngjun Park, Minchan Kim,
	Sergey Senozhatsky, Liam R. Howlett, Lorenzo Stoakes,
	Vlastimil Babka, Jann Horn, Pedro Falcato
  Cc: linux-fsdevel, linux-mm, linux-kernel



On 17/11/26 12:46 pm, Shivank Garg wrote:
> invalidate_remote_inode() lost its last user in commit d73065e60dcc
> ("afs: Use alternative invalidation to using launder_folio").
> mapping_clear_release_always() has no callers.

That was added in b4fa966f03b7401ceacd4ffd7227197afb2b8376.

> 
> Signed-off-by: Shivank Garg <shivankg@amd.com>
> ---

Reviewed-by: Dev Jain <dev.jain@arm.com>


>  include/linux/pagemap.h | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> index 73af18a37367..e681a7ba6642 100644
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@ -20,12 +20,6 @@ struct folio_batch;
>  unsigned long invalidate_mapping_pages(struct address_space *mapping,
>  					pgoff_t start, pgoff_t end);
>  
> -static inline void invalidate_remote_inode(struct inode *inode)
> -{
> -	if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
> -	    S_ISLNK(inode->i_mode))
> -		invalidate_mapping_pages(inode->i_mapping, 0, -1);
> -}
>  int invalidate_inode_pages2(struct address_space *mapping);
>  int invalidate_inode_pages2_range(struct address_space *mapping,
>  		pgoff_t start, pgoff_t end);
> @@ -298,11 +292,6 @@ static inline void mapping_set_release_always(struct address_space *mapping)
>  	set_bit(AS_RELEASE_ALWAYS, &mapping->flags);
>  }
>  
> -static inline void mapping_clear_release_always(struct address_space *mapping)
> -{
> -	clear_bit(AS_RELEASE_ALWAYS, &mapping->flags);
> -}
> -
>  static inline bool mapping_stable_writes(const struct address_space *mapping)
>  {
>  	return test_bit(AS_STABLE_WRITES, &mapping->flags);
> 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH mm-new v2 3/5] mm/swap: remove unused folio_to_swp_tb()
  2026-11-17  7:16 ` [PATCH mm-new v2 3/5] mm/swap: remove unused folio_to_swp_tb() Shivank Garg
  2026-11-17 10:03   ` Barry Song
@ 2026-11-18 16:13   ` Dev Jain
  1 sibling, 0 replies; 14+ messages in thread
From: Dev Jain @ 2026-11-18 16:13 UTC (permalink / raw)
  To: Shivank Garg, Matthew Wilcox (Oracle),
	Jan Kara, Andrew Morton, Chris Li, Kairui Song, Kemeng Shi,
	Nhat Pham, Baoquan He, Barry Song, Youngjun Park, Minchan Kim,
	Sergey Senozhatsky, Liam R. Howlett, Lorenzo Stoakes,
	Vlastimil Babka, Jann Horn, Pedro Falcato
  Cc: linux-fsdevel, linux-mm, linux-kernel



On 17/11/26 12:46 pm, Shivank Garg wrote:
> Its last users were removed in commit 0d6af9bcf383 ("mm, swap: use the
> swap table to track the swap count").
> 
> Signed-off-by: Shivank Garg <shivankg@amd.com>
> ---

Reviewed-by: Dev Jain <dev.jain@arm.com>


>  mm/swap_table.h | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/mm/swap_table.h b/mm/swap_table.h
> index 072625d60d54..022d2251884e 100644
> --- a/mm/swap_table.h
> +++ b/mm/swap_table.h
> @@ -135,11 +135,6 @@ static inline unsigned long pfn_to_swp_tb(unsigned long pfn, unsigned char flags
>  	return swp_tb | __flags_to_swp_tb(flags);
>  }
>  
> -static inline unsigned long folio_to_swp_tb(struct folio *folio, unsigned char flags)
> -{
> -	return pfn_to_swp_tb(folio_pfn(folio), flags);
> -}
> -
>  static inline unsigned long shadow_to_swp_tb(void *shadow, unsigned char flags)
>  {
>  	BUILD_BUG_ON((BITS_PER_XA_VALUE + 1) !=
> 


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-11-18 16:13 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-17  7:16 [PATCH mm-new v2 0/5] mm: remove unused functions Shivank Garg
2026-11-17  7:16 ` [PATCH mm-new v2 1/5] mm: remove unused helpers from pagemap.h Shivank Garg
2026-11-17 10:01   ` Barry Song
2026-11-18 16:11   ` Dev Jain
2026-11-17  7:16 ` [PATCH mm-new v2 2/5] mm/swapops: remove unused make_guard_swp_entry() Shivank Garg
2026-11-17 10:02   ` Barry Song
2026-11-17  7:16 ` [PATCH mm-new v2 3/5] mm/swap: remove unused folio_to_swp_tb() Shivank Garg
2026-11-17 10:03   ` Barry Song
2026-11-18 16:13   ` Dev Jain
2026-11-17  7:16 ` [PATCH mm-new v2 4/5] mm/zsmalloc: remove unused zpdesc_lock() Shivank Garg
2026-11-17 10:04   ` Barry Song
2026-11-18  2:17   ` Sergey Senozhatsky
2026-11-17  7:16 ` [PATCH mm-new v2 5/5] mm: nommu: remove unused heap_stack_gap Shivank Garg
2026-11-17 10:07   ` Barry Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®