]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net-memcg: Pass struct sock to mem_cgroup_sk_(un)?charge().
authorKuniyuki Iwashima <kuniyu@google.com>
Fri, 15 Aug 2025 20:16:16 +0000 (20:16 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 20 Aug 2025 02:20:59 +0000 (19:20 -0700)
commitbb178c6bc08525d758a57775458d644304011bf8
tree6e9e0e20116b1ca3b1c9189d5c2b6c34e756ae97
parent43049b0db03823c2cd003ca7d3dddcd3924da8dc
net-memcg: Pass struct sock to mem_cgroup_sk_(un)?charge().

We will store a flag in the lowest bit of sk->sk_memcg.

Then, we cannot pass the raw pointer to mem_cgroup_charge_skmem()
and mem_cgroup_uncharge_skmem().

Let's pass struct sock to the functions.

While at it, they are renamed to match other functions starting
with mem_cgroup_sk_.

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Link: https://patch.msgid.link/20250815201712.1745332-9-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/memcontrol.h
mm/memcontrol.c
net/core/sock.c
net/ipv4/inet_connection_sock.c
net/ipv4/tcp_output.c