Skip to content

Commit

Permalink
mm/memory-failure: don't export hwpoison_filter() when !CONFIG_HWPOIS…
Browse files Browse the repository at this point in the history
…ON_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 <linmiaohe@huawei.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202406070136.hGQwVbsv-lkp@intel.com/
Cc: Borislav Petkov (AMD) <bp@alien8.de>
Cc: David Hildenbrand <david@redhat.com>
Cc: Naoya Horiguchi <nao.horiguchi@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
MiaoheLin authored and akpm00 committed Jul 4, 2024
1 parent 4d64ab2 commit 5a8b01b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mm/memory-failure.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,15 +294,14 @@ int hwpoison_filter(struct page *p)

return 0;
}
EXPORT_SYMBOL_GPL(hwpoison_filter);
#else
int hwpoison_filter(struct page *p)
{
return 0;
}
#endif

EXPORT_SYMBOL_GPL(hwpoison_filter);

/*
* Kill all processes that have a poisoned page mapped and then isolate
* the page.
Expand Down

0 comments on commit 5a8b01b

Please sign in to comment.