Skip to content

Commit 6b95693

Browse files
Muchun Songakpm00
authored andcommitted
mm: memcontrol: fix swap counter leak from offline cgroup
commit 73f839b addressed an issue regarding the swap counter leak that occurred from an offline cgroup. However, commit 89ce924 modified the parameter from @swap_memcg to @memcg (presumably this alteration was introduced while resolving conflicts). Fix this problem by reverting this minor change. Link: https://lkml.kernel.org/r/20250410081812.10073-1-songmuchun@bytedance.com Fixes: 89ce924 ("mm: memcontrol: move memsw charge callbacks to v1") Signed-off-by: Muchun Song <songmuchun@bytedance.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> Acked-by: Roman Gushchin <roman.gushchin@linux.dev> Cc: Michal Hocko <mhocko@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 5e610c8 commit 6b95693

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/memcontrol-v1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ void memcg1_swapout(struct folio *folio, swp_entry_t entry)
620620
mem_cgroup_id_get_many(swap_memcg, nr_entries - 1);
621621
mod_memcg_state(swap_memcg, MEMCG_SWAP, nr_entries);
622622

623-
swap_cgroup_record(folio, mem_cgroup_id(memcg), entry);
623+
swap_cgroup_record(folio, mem_cgroup_id(swap_memcg), entry);
624624

625625
folio_unqueue_deferred_split(folio);
626626
folio->memcg_data = 0;

0 commit comments

Comments
 (0)