diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/udp.c | 3 | ||||
-rw-r--r-- | net/ipv6/udp.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index cd1d044a7fa5..ebe46ed997cb 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1810,8 +1810,7 @@ static int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) static struct static_key udp_encap_needed __read_mostly; void udp_encap_enable(void) { - if (!static_key_enabled(&udp_encap_needed)) - static_key_slow_inc(&udp_encap_needed); + static_key_enable(&udp_encap_needed); } EXPORT_SYMBOL(udp_encap_enable); diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 20039c8501eb..8cd9b628cdc7 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -575,8 +575,7 @@ static __inline__ void udpv6_err(struct sk_buff *skb, static struct static_key udpv6_encap_needed __read_mostly; void udpv6_encap_enable(void) { - if (!static_key_enabled(&udpv6_encap_needed)) - static_key_slow_inc(&udpv6_encap_needed); + static_key_enable(&udpv6_encap_needed); } EXPORT_SYMBOL(udpv6_encap_enable); |