From b35711297503445fa24c78d195f070ccb2f6d260 Mon Sep 17 00:00:00 2001 From: Ma Wupeng Date: Fri, 11 Nov 2022 09:32:22 +0800 Subject: [PATCH] mm: Export static key mem_reliable 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 Reviewed-by: Kefeng Wang --- 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 DEFINE_STATIC_KEY_FALSE(mem_reliable); +EXPORT_SYMBOL_GPL(mem_reliable); bool reliable_enabled; -- GitLab