]> www.infradead.org Git - users/willy/xarray.git/commitdiff
mptcp: Use tcp_under_memory_pressure() in mptcp_epollin_ready().
authorKuniyuki Iwashima <kuniyu@google.com>
Fri, 15 Aug 2025 20:16:10 +0000 (20:16 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 20 Aug 2025 02:20:58 +0000 (19:20 -0700)
Some conditions used in mptcp_epollin_ready() are the same as
tcp_under_memory_pressure().

We will modify tcp_under_memory_pressure() in the later patch.

Let's use tcp_under_memory_pressure() instead.

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Reviewed-by: Shakeel Butt <shakeel.butt@linux.dev>
Link: https://patch.msgid.link/20250815201712.1745332-3-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/protocol.h

index b15d7fab5c4b66c6fb7a7cbdc91d49547ada6a94..a1787a1344ac1bbeefdb4548740d6aef980b79e7 100644 (file)
@@ -788,9 +788,7 @@ static inline bool mptcp_epollin_ready(const struct sock *sk)
         * as it can always coalesce them
         */
        return (data_avail >= sk->sk_rcvlowat) ||
-              (mem_cgroup_sockets_enabled && sk->sk_memcg &&
-               mem_cgroup_under_socket_pressure(sk->sk_memcg)) ||
-              READ_ONCE(tcp_memory_pressure);
+               tcp_under_memory_pressure(sk);
 }
 
 int mptcp_set_rcvlowat(struct sock *sk, int val);