]> www.infradead.org Git - users/jedix/linux-maple.git/commit
memcg: introduce memcg_uncharge
authorShakeel Butt <shakeel.butt@linux.dev>
Fri, 4 Apr 2025 01:39:07 +0000 (18:39 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 12 May 2025 00:48:10 +0000 (17:48 -0700)
commit89f342af660332656bbade4cc8a919a40674ac41
treec6c28664a3618780737871b95c9b92191d003fbd
parent65d2d15f41c603dc8f11ff0d1bcda2dd847a65b5
memcg: introduce memcg_uncharge

At multiple places in memcontrol.c, the memory and memsw page counters are
being uncharged.  This is error-prone.  Let's move the functionality to a
newly introduced memcg_uncharge and call it from all those places.

Link: https://lkml.kernel.org/r/20250404013913.1663035-4-shakeel.butt@linux.dev
Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c