From 4d5dd752e64db1ed3834036c883c80b9f07be0c8 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sat, 4 Jun 2022 11:31:06 -0700 Subject: [PATCH] mm-factor-helpers-for-memory_failure_dev_pagemap-fix fix CONFIG_HUGETLB_PAGE=n build Reported-by: kernel test robot Cc: Shiyang Ruan Signed-off-by: Andrew Morton --- mm/memory-failure.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 639fb551bdaf..aa821ba1095c 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1716,12 +1716,21 @@ out: unlock_page(head); return res; } + #else + +static inline int mf_generic_kill_procs(unsigned long long pfn, int flags, + struct dev_pagemap *pgmap) +{ + return 0; +} + static inline int try_memory_failure_hugetlb(unsigned long pfn, int flags, int *hugetlb) { return 0; } -#endif + +#endif /* CONFIG_HUGETLB_PAGE */ static int memory_failure_dev_pagemap(unsigned long pfn, int flags, struct dev_pagemap *pgmap) -- 2.50.1