locking/static_key: always define static_branch_deferred_inc
authorWillem de Bruijn <willemb@google.com>
Thu, 13 Jun 2019 15:08:15 +0000 (11:08 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 15 Jun 2019 02:31:47 +0000 (19:31 -0700)
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>
include/linux/jump_label_ratelimit.h

index 42710d5949ba3654a4812d7050ce97c1c218a610..8c3ee291b2d81e28ed2653a2a718983e684dc151 100644 (file)
@@ -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 */