summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/net/sock.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 093b51719c69..80469c2c448d 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1271,10 +1271,15 @@ 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))
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 ?
+ sk->sk_prot->stream_memory_free(sk, wake) : true;
+#endif
}
static inline bool sk_stream_memory_free(const struct sock *sk)