diff options
author | Michal Hocko <mhocko@suse.cz> | 2011-05-26 16:25:28 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-26 17:12:35 -0700 |
commit | 39cc98f1f8aa949afeea89f424c7494b0785d7da (patch) | |
tree | d16d69a1c2f1db6150642d47927d77615507e856 | |
parent | d149e3b25d7c5f33de9aa866303926fa53535aa7 (diff) | |
download | kernel-common-39cc98f1f8aa949afeea89f424c7494b0785d7da.tar.gz kernel-common-39cc98f1f8aa949afeea89f424c7494b0785d7da.tar.bz2 kernel-common-39cc98f1f8aa949afeea89f424c7494b0785d7da.zip |
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 <mhocko@suse.cz>
Acked-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/memcontrol.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index e41a6c26f1e7..fc62c714f3b6 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); } |