]> www.infradead.org Git - nvme.git/commit
mm: memcg: gather memcg1-specific fields initialization in memcg1_memcg_init()
authorRoman Gushchin <roman.gushchin@linux.dev>
Fri, 28 Jun 2024 21:03:12 +0000 (21:03 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 5 Jul 2024 01:05:56 +0000 (18:05 -0700)
commitb5855a26dedf210bcc1deb4cb30f9f657571a28a
tree4dab01c3d7985ceaafefc09b48b0e80cab6aa9ad
parent47d2702b20f514296dbd1e065ff93f926ca112bd
mm: memcg: gather memcg1-specific fields initialization in memcg1_memcg_init()

Gather all memcg1-specific struct mem_cgroup's members initialization in a
new memcg1_memcg_init() function, defined in mm/memcontrol-v1.c.
Obviously, if CONFIG_MEMCG_V1 is not set, there is no need to initialize
these fields, so the function becomes trivial.

Link: https://lkml.kernel.org/r/20240628210317.272856-5-roman.gushchin@linux.dev
Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol-v1.c
mm/memcontrol-v1.h
mm/memcontrol.c