Skip to content

Commit

Permalink
Merge branch 'enable-and-use-static_branch_deferred_inc'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Jun 15, 2019
2 parents 26e392c + 7b58139 commit 3d797eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions include/linux/jump_label_ratelimit.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 */
2 changes: 1 addition & 1 deletion net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 3d797eb

Please sign in to comment.