mm/swap: fix swap_cluster_lock() !CONFIG_SWAP stub signature mismatch

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.

Delete the unused stub function entirely.

Link: https://lore.kernel.org/20260717071104.73467-1-hongfu.li@linux.dev
Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
Reviewed-by: Baoquan He <baoquan.he@linux.dev>
Acked-by: Kairui Song <kasong@tencent.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Chris Li <chrisl@kernel.org>
Cc: Hongfu Li <lihongfu@kylinos.cn>
Cc: Kemeng Shi <shikemeng@huaweicloud.com>
Cc: Nhat Pham <nphamcs@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Hongfu Li
2026-07-17 15:11:04 +08:00
committed by Andrew Morton
parent c01e6df60e
commit b090524f77

View File

@@ -358,11 +358,6 @@ void swap_update_readahead(struct folio *folio, struct vm_area_struct *vma,
unsigned long addr);
#else /* CONFIG_SWAP */
static inline struct swap_cluster_info *swap_cluster_lock(
struct swap_info_struct *si, pgoff_t offset, bool irq)
{
return NULL;
}
static inline struct swap_cluster_info *swap_cluster_get_and_lock(
struct folio *folio)