]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net-memcg: Introduce mem_cgroup_sk_enabled().
authorKuniyuki Iwashima <kuniyu@google.com>
Fri, 15 Aug 2025 20:16:15 +0000 (20:16 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 20 Aug 2025 02:20:59 +0000 (19:20 -0700)
commit43049b0db03823c2cd003ca7d3dddcd3924da8dc
treeef0449869b6c56f9c51900891c54697239357097
parentf7161b234f2ec7f18999009c4becc04eeb6b12a7
net-memcg: Introduce mem_cgroup_sk_enabled().

The socket memcg feature is enabled by a static key and
only works for non-root cgroup.

We check both conditions in many places.

Let's factorise it as a helper function.

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-8-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/proto_memory.h
include/net/sock.h
include/net/tcp.h
net/core/sock.c
net/ipv4/tcp_output.c