tcp: convert tcp_md5_needed to static_branch API
We prefer static_branch_unlikely() over static_key_false() these days. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
a43e052bea
commit
921f9a0f2e
@@ -1558,7 +1558,7 @@ struct tcp_md5sig_key *tcp_v4_md5_lookup(const struct sock *sk,
|
||||
|
||||
#ifdef CONFIG_TCP_MD5SIG
|
||||
#include <linux/jump_label.h>
|
||||
extern struct static_key tcp_md5_needed;
|
||||
extern struct static_key_false tcp_md5_needed;
|
||||
struct tcp_md5sig_key *__tcp_md5_do_lookup(const struct sock *sk,
|
||||
const union tcp_md5_addr *addr,
|
||||
int family);
|
||||
@@ -1567,7 +1567,7 @@ tcp_md5_do_lookup(const struct sock *sk,
|
||||
const union tcp_md5_addr *addr,
|
||||
int family)
|
||||
{
|
||||
if (!static_key_false(&tcp_md5_needed))
|
||||
if (!static_branch_unlikely(&tcp_md5_needed))
|
||||
return NULL;
|
||||
return __tcp_md5_do_lookup(sk, addr, family);
|
||||
}
|
||||
|
Reference in New Issue
Block a user