Commit 3d797eb1 authored by David S. Miller's avatar David S. Miller

Merge branch 'enable-and-use-static_branch_deferred_inc'

Willem de Bruijn says:

====================
enable and use static_branch_deferred_inc

1. make static_branch_deferred_inc available if !CONFIG_JUMP_LABEL
2. convert the existing STATIC_KEY_DEFERRED_FALSE user to this api
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 26e392ca 7b58139f
...@@ -60,8 +60,6 @@ extern void jump_label_update_timeout(struct work_struct *work); ...@@ -60,8 +60,6 @@ extern void jump_label_update_timeout(struct work_struct *work);
0), \ 0), \
} }
#define static_branch_deferred_inc(x) static_branch_inc(&(x)->key)
#else /* !CONFIG_JUMP_LABEL */ #else /* !CONFIG_JUMP_LABEL */
struct static_key_deferred { struct static_key_deferred {
struct static_key key; struct static_key key;
...@@ -95,4 +93,7 @@ jump_label_rate_limit(struct static_key_deferred *key, ...@@ -95,4 +93,7 @@ jump_label_rate_limit(struct static_key_deferred *key,
STATIC_KEY_CHECK_USE(key); STATIC_KEY_CHECK_USE(key);
} }
#endif /* CONFIG_JUMP_LABEL */ #endif /* CONFIG_JUMP_LABEL */
#define static_branch_deferred_inc(x) static_branch_inc(&(x)->key)
#endif /* _LINUX_JUMP_LABEL_RATELIMIT_H */ #endif /* _LINUX_JUMP_LABEL_RATELIMIT_H */
...@@ -119,7 +119,7 @@ void clean_acked_data_enable(struct inet_connection_sock *icsk, ...@@ -119,7 +119,7 @@ void clean_acked_data_enable(struct inet_connection_sock *icsk,
void (*cad)(struct sock *sk, u32 ack_seq)) void (*cad)(struct sock *sk, u32 ack_seq))
{ {
icsk->icsk_clean_acked = cad; icsk->icsk_clean_acked = cad;
static_branch_inc(&clean_acked_data_enabled.key); static_branch_deferred_inc(&clean_acked_data_enabled);
} }
EXPORT_SYMBOL_GPL(clean_acked_data_enable); EXPORT_SYMBOL_GPL(clean_acked_data_enable);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment