[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20211028011205.151804-1-eric.dumazet@gmail.com>
Date: Wed, 27 Oct 2021 18:12:05 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: netdev <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
Eric Dumazet <eric.dumazet@...il.com>
Subject: [PATCH net-next] net: cleanup __sk_stream_memory_free()
From: Eric Dumazet <edumazet@...gle.com>
We now have INDIRECT_CALL_INET_1() macro, no need to use #ifdef CONFIG_INET
Signed-off-by: Eric Dumazet <edumazet@...gle.com>
---
include/net/sock.h | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/include/net/sock.h b/include/net/sock.h
index ff4e62aa62e51a68d086e9e2b8429cba5731be00..36d6321a587781fc1e058bae69eee27bc94a7b20 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1299,15 +1299,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))
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
+ INDIRECT_CALL_INET_1(sk->sk_prot->stream_memory_free,
+ tcp_stream_memory_free, sk, wake) : true;
}
static inline bool sk_stream_memory_free(const struct sock *sk)
--
2.33.0.1079.g6e70778dc9-goog
Powered by blists - more mailing lists