]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/memcg: mz already removed from rb_tree if not NULL
authorWei Yang <richard.weiyang@gmail.com>
Thu, 14 Apr 2022 06:07:04 +0000 (23:07 -0700)
committerakpm <akpm@linux-foundation.org>
Thu, 14 Apr 2022 06:07:04 +0000 (23:07 -0700)
When mz is not NULL, it means mz can either come from
mem_cgroup_largest_soft_limit_node or
__mem_cgroup_largest_soft_limit_node.  And both of them have removed this
node by __mem_cgroup_remove_exceeded().

Not necessary to call __mem_cgroup_remove_exceeded() again.

[mhocko@suse.com: refine changelog]
Link: https://lkml.kernel.org/r/20220314233030.12334-1-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c

index 7a3775741fcb09f6f7b7cf41c0ae0ae5d54baa6c..84ebec1bd39cf6f4e39c8d9298c0e65b56228c09 100644 (file)
@@ -3419,7 +3419,6 @@ unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order,
                                                    gfp_mask, total_scanned);
                nr_reclaimed += reclaimed;
                spin_lock_irq(&mctz->lock);
-               __mem_cgroup_remove_exceeded(mz, mctz);
 
                /*
                 * If we failed to reclaim anything from this memory cgroup