summaryrefslogtreecommitdiffstats
path: root/include/net/ip_tunnels.h
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2018-05-08 18:06:58 +0200
committerDavid S. Miller <davem@davemloft.net>2018-05-10 21:13:33 +0200
commit5263a98f162f7a46e1292632c87f1e3444eb8fbf (patch)
tree12de564021d5493f2034d275e60db019fe2e32da /include/net/ip_tunnels.h
parentnet: dsa: mv88e6xxx: 88E6141/6341 SERDES support (diff)
downloadlinux-5263a98f162f7a46e1292632c87f1e3444eb8fbf.tar.xz
linux-5263a98f162f7a46e1292632c87f1e3444eb8fbf.zip
net/ipv4: Update ip_tunnel_metadata_cnt static key to modern api
No changes in refcount semantics -- key init is false; replace static_key_slow_inc|dec with static_branch_inc|dec static_key_false with static_branch_unlikely Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip_tunnels.h')
-rw-r--r--include/net/ip_tunnels.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h
index 751646adc769..90ff430f5e9d 100644
--- a/include/net/ip_tunnels.h
+++ b/include/net/ip_tunnels.h
@@ -477,12 +477,12 @@ static inline struct ip_tunnel_info *lwt_tun_info(struct lwtunnel_state *lwtstat
return (struct ip_tunnel_info *)lwtstate->data;
}
-extern struct static_key ip_tunnel_metadata_cnt;
+DECLARE_STATIC_KEY_FALSE(ip_tunnel_metadata_cnt);
/* Returns > 0 if metadata should be collected */
static inline int ip_tunnel_collect_metadata(void)
{
- return static_key_false(&ip_tunnel_metadata_cnt);
+ return static_branch_unlikely(&ip_tunnel_metadata_cnt);
}
void __init ip_tunnel_core_init(void);