static keys: Introduce 'struct static_key', static_key_true()/false() and static_key_...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / linux / netfilter.h
index b809265607d0427ecfba54750af897b40609e5b6..29734be334c11b5e5e116483efc7da470d1ca00c 100644 (file)
@@ -163,13 +163,13 @@ extern struct ctl_path nf_net_ipv4_netfilter_sysctl_path[];
 extern struct list_head nf_hooks[NFPROTO_NUMPROTO][NF_MAX_HOOKS];
 
 #if defined(CONFIG_JUMP_LABEL)
-#include <linux/jump_label.h>
-extern struct jump_label_key nf_hooks_needed[NFPROTO_NUMPROTO][NF_MAX_HOOKS];
+#include <linux/static_key.h>
+extern struct static_key nf_hooks_needed[NFPROTO_NUMPROTO][NF_MAX_HOOKS];
 static inline bool nf_hooks_active(u_int8_t pf, unsigned int hook)
 {
        if (__builtin_constant_p(pf) &&
            __builtin_constant_p(hook))
-               return static_branch(&nf_hooks_needed[pf][hook]);
+               return static_key_false(&nf_hooks_needed[pf][hook]);
 
        return !list_empty(&nf_hooks[pf][hook]);
 }