Commit 39cc98f1f8aa949afeea89f424c7494b0785d7da
Committed by
Linus Torvalds
1 parent
d149e3b25d
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>
Showing 1 changed file with 2 additions and 3 deletions Side-by-side Diff
mm/memcontrol.c
... | ... | @@ -3348,10 +3348,9 @@ |
3348 | 3348 | */ |
3349 | 3349 | next_mz = |
3350 | 3350 | __mem_cgroup_largest_soft_limit_node(mctz); |
3351 | - if (next_mz == mz) { | |
3351 | + if (next_mz == mz) | |
3352 | 3352 | css_put(&next_mz->mem->css); |
3353 | - next_mz = NULL; | |
3354 | - } else /* next_mz == NULL or other memcg */ | |
3353 | + else /* next_mz == NULL or other memcg */ | |
3355 | 3354 | break; |
3356 | 3355 | } while (1); |
3357 | 3356 | } |