From: Michal Hocko Date: Thu, 26 May 2011 23:25:28 +0000 (-0700) Subject: memcg: remove pointless next_mz nullification in mem_cgroup_soft_limit_reclaim() X-Git-Tag: upstream/snapshot3+hdmi~10106 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39cc98f1f8aa949afeea89f424c7494b0785d7da;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git memcg: remove pointless next_mz nullification in mem_cgroup_soft_limit_reclaim() next_mz is assigned to NULL if __mem_cgroup_largest_soft_limit_node selects the same mz. This doesn't make much sense as we assign to the variable right in the next loop. Compiler will probably optimize this out but it is little bit confusing for the code reading. Signed-off-by: Michal Hocko Acked-by: Daisuke Nishimura Cc: Balbir Singh Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memcontrol.c b/mm/memcontrol.c index e41a6c2..fc62c71 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3348,10 +3348,9 @@ unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, */ next_mz = __mem_cgroup_largest_soft_limit_node(mctz); - if (next_mz == mz) { + if (next_mz == mz) css_put(&next_mz->mem->css); - next_mz = NULL; - } else /* next_mz == NULL or other memcg */ + else /* next_mz == NULL or other memcg */ break; } while (1); }