net: constify sk_dst_get() and __sk_dst_get() argument

[ Upstream commit 5033f58d5feed1040eebeadb0c5efc95b8bf5720 ]

Both helpers only read fields from their socket argument.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Eric Dumazet 2023-09-20 17:29:41 +00:00 committed by Greg Kroah-Hartman
parent f797a2f74a
commit 22c8e0b87b
1 changed files with 2 additions and 2 deletions

View File

@ -2152,14 +2152,14 @@ static inline bool sk_rethink_txhash(struct sock *sk)
}
static inline struct dst_entry *
__sk_dst_get(struct sock *sk)
__sk_dst_get(const struct sock *sk)
{
return rcu_dereference_check(sk->sk_dst_cache,
lockdep_sock_is_held(sk));
}
static inline struct dst_entry *
sk_dst_get(struct sock *sk)
sk_dst_get(const struct sock *sk)
{
struct dst_entry *dst;