All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/swap: Fix swap_cluster_lock() !CONFIG_SWAP stub signature mismatch
@ 2026-07-16  8:51 Hongfu Li
  2026-07-16  8:57 ` Baoquan He
  2026-07-16  9:47 ` Kairui Song
  0 siblings, 2 replies; 4+ messages in thread
From: Hongfu Li @ 2026-07-16  8:51 UTC (permalink / raw)
  To: akpm, chrisl, kasong, shikemeng, nphamcs, baoquan.he, baohua,
	youngjun.park
  Cc: linux-mm, linux-kernel, hongfu.li, Hongfu Li

From: Hongfu Li <lihongfu@kylinos.cn>

The !CONFIG_SWAP stub for swap_cluster_lock() has mismatched prototype:
it has an extra unused irq argument and uses pgoff_t instead of unsigned
long for offset. All callers are under CONFIG_SWAP so the extra parameter
is dead.

Sync the stub signature with the real function.

Fixes: 8578e0c00dcf ("mm, swap: use the swap table for the swap cache and switch API")
Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
---
 mm/swap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/swap.h b/mm/swap.h
index 77d2d14eda42..2c4667662601 100644
--- a/mm/swap.h
+++ b/mm/swap.h
@@ -337,7 +337,7 @@ static inline unsigned int folio_swap_flags(struct folio *folio)
 #else /* CONFIG_SWAP */
 struct swap_iocb;
 static inline struct swap_cluster_info *swap_cluster_lock(
-	struct swap_info_struct *si, pgoff_t offset, bool irq)
+		struct swap_info_struct *si, unsigned long offset)
 {
 	return NULL;
 }
-- 
2.54.0


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

end of thread, other threads:[~2026-07-16 12:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-16  8:51 [PATCH] mm/swap: Fix swap_cluster_lock() !CONFIG_SWAP stub signature mismatch Hongfu Li
2026-07-16  8:57 ` Baoquan He
2026-07-16  9:47 ` Kairui Song
2026-07-16 12:44   ` Hongfu Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.