memcg: simple cleanup of stats update functions
authorShakeel Butt <shakeel.butt@linux.dev>
Sat, 20 Apr 2024 23:25:05 +0000 (16:25 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 6 May 2024 00:53:44 +0000 (17:53 -0700)
commit91882c1617c15eb2a4e996b0822e0b9cbd854dea
treeec1a4a35ba26774ef2934dc1e56c73c3db7d986b
parent6ed31ba3921162ef5d4f2f99b91681e8fd24ff34
memcg: simple cleanup of stats update functions

mod_memcg_lruvec_state() is never called from outside of memcontrol.c and
with always irq disabled.  So, replace it with the irq disabled version
and add an assert that irq is disabled in the caller.

Similarly mod_objcg_state() is not called from outside of memcontrol.c, so
simply make it static and change it's name to __mod_objcg_state().

Link: https://lkml.kernel.org/r/20240420232505.2768428-1-shakeel.butt@linux.dev
Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: T.J. Mercier <tjmercier@google.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/memcontrol.h
mm/memcontrol.c
mm/slab.h