From: Ma Wupeng mawupeng1@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA
--------------------------------
Static key mem_reliable is used to check wheater memory reliable's status in kernel's inline functions. These inline function rely on this but dirver can not use because this symbol is not exported. To slove this problem, export this symbol to make prepration for driver to use memory reliable's inline function.
Signed-off-by: Ma Wupeng mawupeng1@huawei.com Reviewed-by: Kefeng Wang wangkefeng.wang@huawei.com --- include/linux/mem_reliable.h | 2 +- mm/mem_reliable.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/mem_reliable.h b/include/linux/mem_reliable.h index 38891cb2fa83..c3a9a4f21470 100644 --- a/include/linux/mem_reliable.h +++ b/include/linux/mem_reliable.h @@ -10,7 +10,7 @@
#ifdef CONFIG_MEMORY_RELIABLE
-extern struct static_key_false mem_reliable; +DECLARE_STATIC_KEY_FALSE(mem_reliable);
extern bool reliable_enabled; extern bool shmem_reliable; diff --git a/mm/mem_reliable.c b/mm/mem_reliable.c index 15a84c0f714e..083997234e01 100644 --- a/mm/mem_reliable.c +++ b/mm/mem_reliable.c @@ -9,6 +9,7 @@ #include <linux/mmzone.h>
DEFINE_STATIC_KEY_FALSE(mem_reliable); +EXPORT_SYMBOL_GPL(mem_reliable);
bool reliable_enabled;