Skip to content

Commit

Permalink
locking/static_key: always define static_branch_deferred_inc
Browse files Browse the repository at this point in the history
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 <willemb@google.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Willem de Bruijn authored and David S. Miller committed Jun 15, 2019
1 parent 26e392c commit f01c373
Showing 1 changed file with 3 additions and 2 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 */

0 comments on commit f01c373

Please sign in to comment.