aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller2019-06-14 19:31:48 -0700
committerDavid S. Miller2019-06-14 19:31:48 -0700
commit3d797eb1d08f02cc767f9e00714077b9ed8670fc (patch)
treec3f54f73cbf2c5ae693678a16c77d3fdcef32d85
parent26e392ca9b76b219fe3e3831f425c28b03f6fd74 (diff)
parent7b58139f98e227289cb2989224dbe0a9c5928d7e (diff)
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: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/jump_label_ratelimit.h5
-rw-r--r--net/ipv4/tcp_input.c2
2 files changed, 4 insertions, 3 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 */
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);