From f01c373fbeed9f5870bb056b65750ccef42f1f20 Mon Sep 17 00:00:00 2001 From: Willem de Bruijn Date: Thu, 13 Jun 2019 11:08:15 -0400 Subject: locking/static_key: always define static_branch_deferred_inc This interface is currently only defined if CONFIG_JUMP_LABEL. Make it available also when jump labels are off. Signed-off-by: Willem de Bruijn Acked-by: Peter Zijlstra (Intel) Signed-off-by: David S. Miller --- include/linux/jump_label_ratelimit.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/jump_label_ratelimit.h b/include/linux/jump_label_ratelimit.h index 42710d5949ba..8c3ee291b2d8 100644 --- a/include/linux/jump_label_ratelimit.h +++ b/include/linux/jump_label_ratelimit.h @@ -60,8 +60,6 @@ extern void jump_label_update_timeout(struct work_struct *work); 0), \ } -#define static_branch_deferred_inc(x) static_branch_inc(&(x)->key) - #else /* !CONFIG_JUMP_LABEL */ struct static_key_deferred { struct static_key key; @@ -95,4 +93,7 @@ jump_label_rate_limit(struct static_key_deferred *key, STATIC_KEY_CHECK_USE(key); } #endif /* CONFIG_JUMP_LABEL */ + +#define static_branch_deferred_inc(x) static_branch_inc(&(x)->key) + #endif /* _LINUX_JUMP_LABEL_RATELIMIT_H */ -- cgit v1.2.3 From 7b58139f98e227289cb2989224dbe0a9c5928d7e Mon Sep 17 00:00:00 2001 From: Willem de Bruijn Date: Thu, 13 Jun 2019 11:08:16 -0400 Subject: tcp: use static_branch_deferred_inc for clean_acked_data_enabled Deferred static key clean_acked_data_enabled uses the deferred variants of dec and flush. Do the same for inc. Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller --- net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 08a477e74cf3..9269bbfc05f9 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -119,7 +119,7 @@ void clean_acked_data_enable(struct inet_connection_sock *icsk, void (*cad)(struct sock *sk, u32 ack_seq)) { 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); -- cgit v1.2.3