|
@@ -54,7 +54,7 @@ EXPORT_SYMBOL_GPL(nf_unregister_afinfo);
|
|
|
struct list_head nf_hooks[NFPROTO_NUMPROTO][NF_MAX_HOOKS] __read_mostly;
|
|
|
EXPORT_SYMBOL(nf_hooks);
|
|
|
|
|
|
-#if defined(CONFIG_JUMP_LABEL)
|
|
|
+#ifdef HAVE_JUMP_LABEL
|
|
|
struct static_key nf_hooks_needed[NFPROTO_NUMPROTO][NF_MAX_HOOKS];
|
|
|
EXPORT_SYMBOL(nf_hooks_needed);
|
|
|
#endif
|
|
@@ -72,7 +72,7 @@ int nf_register_hook(struct nf_hook_ops *reg)
|
|
|
}
|
|
|
list_add_rcu(®->list, elem->list.prev);
|
|
|
mutex_unlock(&nf_hook_mutex);
|
|
|
-#if defined(CONFIG_JUMP_LABEL)
|
|
|
+#ifdef HAVE_JUMP_LABEL
|
|
|
static_key_slow_inc(&nf_hooks_needed[reg->pf][reg->hooknum]);
|
|
|
#endif
|
|
|
return 0;
|
|
@@ -84,7 +84,7 @@ void nf_unregister_hook(struct nf_hook_ops *reg)
|
|
|
mutex_lock(&nf_hook_mutex);
|
|
|
list_del_rcu(®->list);
|
|
|
mutex_unlock(&nf_hook_mutex);
|
|
|
-#if defined(CONFIG_JUMP_LABEL)
|
|
|
+#ifdef HAVE_JUMP_LABEL
|
|
|
static_key_slow_dec(&nf_hooks_needed[reg->pf][reg->hooknum]);
|
|
|
#endif
|
|
|
synchronize_net();
|