summaryrefslogtreecommitdiff
path: root/include/net/inet_connection_sock.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-08-16 08:15:42 +0000
committerDavid S. Miller <davem@davemloft.net>2023-08-16 11:09:17 +0100
commitb1c0356a58577ce0a583e3044bf801877fc0b5de (patch)
treea5ed4452baf8a48fce1274b747228b842b18f377 /include/net/inet_connection_sock.h
parent4bd0623f04eef65c0a324000fad73c4d3a677f8e (diff)
inet: move inet->is_icsk to inet->inet_flags
We move single bit fields to inet->inet_flags to avoid races. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Soheil Hassas Yeganeh <soheil@google.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inet_connection_sock.h')
-rw-r--r--include/net/inet_connection_sock.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index be3c858a2ebb..5d2fcc137b88 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -342,9 +342,9 @@ static inline bool inet_csk_in_pingpong_mode(struct sock *sk)
return inet_csk(sk)->icsk_ack.pingpong >= TCP_PINGPONG_THRESH;
}
-static inline bool inet_csk_has_ulp(struct sock *sk)
+static inline bool inet_csk_has_ulp(const struct sock *sk)
{
- return inet_sk(sk)->is_icsk && !!inet_csk(sk)->icsk_ulp_ops;
+ return inet_test_bit(IS_ICSK, sk) && !!inet_csk(sk)->icsk_ulp_ops;
}
#endif /* _INET_CONNECTION_SOCK_H */