diff options
| author | Kuniyuki Iwashima <kuniyu@google.com> | 2025-08-15 20:16:13 +0000 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-08-19 19:20:59 -0700 |
| commit | bd4aa2337374dd04b8627efd26227ebd49f69285 (patch) | |
| tree | dbcc31eb4bb5b1d69e5d8191978c0e4abf81d790 /net/ipv4/tcp_output.c | |
| parent | net: Call trace_sock_exceed_buf_limit() for memcg failure with SK_MEM_RECV. (diff) | |
| download | linux-bd4aa2337374dd04b8627efd26227ebd49f69285.tar.gz linux-bd4aa2337374dd04b8627efd26227ebd49f69285.zip | |
net: Clean up __sk_mem_raise_allocated().
In __sk_mem_raise_allocated(), charged is initialised as true due
to the weird condition removed in the previous patch.
It makes the variable unreliable by itself, so we have to check
another variable, memcg, in advance.
Also, we will factorise the common check below for memcg later.
if (mem_cgroup_sockets_enabled && sk->sk_memcg)
As a prep, let's initialise charged as false and memcg as NULL.
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Shakeel Butt <shakeel.butt@linux.dev>
Link: https://patch.msgid.link/20250815201712.1745332-6-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/tcp_output.c')
0 files changed, 0 insertions, 0 deletions
