]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm: memcontrol: use __account_obj_stock() in the !locked path
authorJohannes Weiner <hannes@cmpxchg.org>
Mon, 2 Mar 2026 19:50:17 +0000 (14:50 -0500)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 5 Apr 2026 20:53:16 +0000 (13:53 -0700)
commit4665aa7e6523c418d6178ef7e23a4159c72b9d3a
tree184e4f635906186ae3fbcd0a7fe9058eafacc48a
parentedb6abd31bff0746c687cf5af9ecacefaa90e9cb
mm: memcontrol: use __account_obj_stock() in the !locked path

Make __account_obj_stock() usable for the case where the local trylock
failed.  Then switch refill_obj_stock() over to it.

This consolidates the mod_objcg_mlstate() call into one place and will
make the next patch easier to follow.

Link: https://lkml.kernel.org/r/20260302195305.620713-5-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
Reviewed-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Reviewed-by: Hao Li <hao.li@linux.dev>
Cc: Johannes Weiner <jweiner@meta.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c