memcg: Removed duplication detection for mem_cgroup_uncharge_swap
Subsystems (3)
PATCH 1/1 memcg: Removed 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.
Signed-off-by Lu Jialin <[email protected]>
--- mm/memcontrol.c | 3 --- 1 file changed, 3 deletions(-)
mm/memcontrol.c +0 -3
@@ -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);
Signature · 1 line
2.34.1
Quoted 7 lines · On Sat, Aug 19, 2023 at 1:14 AM Lu Jialin…
__mem_cgroup_uncharge_swapis only called inmem_cgroup_uncharge_swap, if mem cgroup is disabled,__mem_cgroup_uncharge_swapcannot be called. Therefore, there is no need to judge whethermem_cgroupis disabled or not.Signed-off-by Lu Jialin <[email protected]>
Acked-by Shakeel Butt <[email protected]>