hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ID6RU3 -------------------------------- Fix kernel build errors when CONFIG_SWAP is not enabled: 1. include/linux/migrate.h:102 - syntax error in stub function. 2. mm/shmem.c:1699 - function signature mismatch in swap_cluster_readahead(). Adjust the stub implementation of swap_cluster_readahead() to match the actual function signature (4 parameters), ensuring consistent function prototypes when CONFIG_SWAP is disabled. Fixes: ed205f43c85f ("mm: convert swap_cluster_readahead and swap_vma_readahead to return a folio") Signed-off-by: Ze Zuo <zuoze1@huawei.com> --- mm/swap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/swap.h b/mm/swap.h index f4a557a753e2..0fd01502d792 100644 --- a/mm/swap.h +++ b/mm/swap.h @@ -107,8 +107,8 @@ static inline void show_swap_cache_info(void) { } -static inline struct folio *swap_cluster_readahead(swp_entry_t entry, - gfp_t gfp_mask, struct vm_fault *vmf) +static inline struct folio *swap_cluster_readahead(swp_entry_t entry, gfp_t flag, + struct mempolicy *mpol, pgoff_t ilx) { return NULL; } -- 2.25.1