Commit a406290a authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

net: cleanup __sk_stream_memory_free()

We now have INDIRECT_CALL_INET_1() macro, no need to use #ifdef CONFIG_INET
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6a03bfbd
...@@ -1310,15 +1310,9 @@ static inline bool __sk_stream_memory_free(const struct sock *sk, int wake) ...@@ -1310,15 +1310,9 @@ static inline bool __sk_stream_memory_free(const struct sock *sk, int wake)
if (READ_ONCE(sk->sk_wmem_queued) >= READ_ONCE(sk->sk_sndbuf)) if (READ_ONCE(sk->sk_wmem_queued) >= READ_ONCE(sk->sk_sndbuf))
return false; return false;
#ifdef CONFIG_INET
return sk->sk_prot->stream_memory_free ?
INDIRECT_CALL_1(sk->sk_prot->stream_memory_free,
tcp_stream_memory_free,
sk, wake) : true;
#else
return sk->sk_prot->stream_memory_free ? return sk->sk_prot->stream_memory_free ?
sk->sk_prot->stream_memory_free(sk, wake) : true; INDIRECT_CALL_INET_1(sk->sk_prot->stream_memory_free,
#endif tcp_stream_memory_free, sk, wake) : true;
} }
static inline bool sk_stream_memory_free(const struct sock *sk) static inline bool sk_stream_memory_free(const struct sock *sk)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment