]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit - mm/memcontrol.c
memcg: remove unused do_memsw_account in memcg1_stat_format
authorLiu Shixin <liushixin2@huawei.com>
Fri, 15 Sep 2023 10:58:45 +0000 (18:58 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 6 Oct 2023 21:44:10 +0000 (14:44 -0700)
commit840ea53a8dec3aa5773f7957d4eaafdf925c664a
tree10f9c6332f48afc8270a5b75535aa5085e1fe26a
parent72a14e821cba73f74aca4bc5f768d77dece8bdb2
memcg: remove unused do_memsw_account in memcg1_stat_format

Since commit b25806dcd3d5("mm: memcontrol: deprecate swapaccounting=0
mode") do_memsw_account() is synonymous with
!cgroup_subsys_on_dfl(memory_cgrp_subsys), It always equals true in
memcg1_stat_format().  Remove the unused code.

Link: https://lkml.kernel.org/r/20230915105845.3199656-3-liushixin2@huawei.com
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Suggested-by: Michal Koutný <mkoutny@suse.com>
Reviewed-by: Yosry Ahmed <yosryahmed@google.com>
Acked-by: Tejun heo <tj@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Zefan Li <lizefan.x@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c