diff options
author | Lu Jialin <[email protected]> | 2023-08-19 08:13:02 +0000 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2023-08-24 16:20:29 -0700 |
commit | 14a405c3a933ce261147a60dfb8bf586b45ec9de (patch) | |
tree | 575499730c7de1854d667514a1ce32c0e64bb350 | |
parent | 07e09c483cbef2a252f75d95670755a0607288f5 (diff) |
memcg: remove duplication detection for mem_cgroup_uncharge_swap
__mem_cgroup_uncharge_swap is only called in mem_cgroup_uncharge_swap, if
mem cgroup is disabled, __mem_cgroup_uncharge_swap cannot be called.
Therefore, there is no need to judge whether mem_cgroup is disabled or
not.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Lu Jialin <[email protected]>
Acked-by: Shakeel Butt <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Roman Gushchin <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Muchun Song <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r-- | mm/memcontrol.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index cf57fe9318d5..0286bd0ab043 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -7535,9 +7535,6 @@ void __mem_cgroup_uncharge_swap(swp_entry_t entry, unsigned int nr_pages) struct mem_cgroup *memcg; unsigned short id; - if (mem_cgroup_disabled()) - return; - id = swap_cgroup_record(entry, 0, nr_pages); rcu_read_lock(); memcg = mem_cgroup_from_id(id); |