From: Masami Hiramatsu (Google) Date: Mon, 9 Dec 2024 02:41:11 +0000 (+0900) Subject: jump_label: Define guard() for jump_label_lock X-Git-Tag: v6.14-rc1~126^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e2b6e5e4877ac898b61338dc20491cd837af79b2;p=thirdparty%2Flinux.git jump_label: Define guard() for jump_label_lock Link: https://lore.kernel.org/all/173371207108.480397.12818384744149153972.stgit@devnote2/ Signed-off-by: Masami Hiramatsu (Google) --- diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index f5a2727ca4a9a..fdb79dd1ebd8c 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h @@ -75,6 +75,7 @@ #include #include +#include extern bool static_key_initialized; @@ -347,6 +348,8 @@ static inline void static_key_disable(struct static_key *key) #endif /* CONFIG_JUMP_LABEL */ +DEFINE_LOCK_GUARD_0(jump_label_lock, jump_label_lock(), jump_label_unlock()) + #define STATIC_KEY_INIT STATIC_KEY_INIT_FALSE #define jump_label_enabled static_key_enabled