diff mbox series

[v3] mm/memcg: mz already removed from rb_tree if not NULL

Message ID 20220314233030.12334-1-richard.weiyang@gmail.com (mailing list archive)
State New
Headers show
Series [v3] mm/memcg: mz already removed from rb_tree if not NULL | expand

Commit Message

Wei Yang March 14, 2022, 11:30 p.m. UTC
When mz is not NULL, it means mz can either come from
mem_cgroup_largest_soft_limit_node or __mem_cgroup_largest_soft_limit_nod.
And both of them has removed this node by __mem_cgroup_remove_exceeded().

Not necessary to call __mem_cgroup_remove_exceeded() again.

[fmhocko@suse.com: refine changelog]
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
---
 mm/memcontrol.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index dc225ca512f6..e803ff02aae2 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3460,7 +3460,6 @@  unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order,
 		nr_reclaimed += reclaimed;
 		*total_scanned += nr_scanned;
 		spin_lock_irq(&mctz->lock);
-		__mem_cgroup_remove_exceeded(mz, mctz);
 
 		/*
 		 * If we failed to reclaim anything from this memory cgroup