From: Miaohe Lin Date: Wed, 12 Jun 2024 07:18:29 +0000 (+0800) Subject: mm/memory-failure: don't export hwpoison_filter() when !CONFIG_HWPOISON_INJECT X-Git-Tag: block-6.11-20240726~15^2~275 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=5a8b01be4f6f50838b094509a49e1e5ed32c1c5c;p=linux-block.git mm/memory-failure: don't export hwpoison_filter() when !CONFIG_HWPOISON_INJECT When CONFIG_HWPOISON_INJECT is not enabled, there is no user of the hwpoison_filter() outside memory-failure. So there is no need to export it in that case. Link: https://lkml.kernel.org/r/20240612071835.157004-8-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406070136.hGQwVbsv-lkp@intel.com/ Cc: Borislav Petkov (AMD) Cc: David Hildenbrand Cc: Naoya Horiguchi Cc: Tony Luck Signed-off-by: Andrew Morton --- diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 339752d768d8..ee6ec63534b7 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -294,6 +294,7 @@ int hwpoison_filter(struct page *p) return 0; } +EXPORT_SYMBOL_GPL(hwpoison_filter); #else int hwpoison_filter(struct page *p) { @@ -301,8 +302,6 @@ int hwpoison_filter(struct page *p) } #endif -EXPORT_SYMBOL_GPL(hwpoison_filter); - /* * Kill all processes that have a poisoned page mapped and then isolate * the page.