]> Git Repo - linux.git/commitdiff
memcg: remove pointless next_mz nullification in mem_cgroup_soft_limit_reclaim()
authorMichal Hocko <[email protected]>
Thu, 26 May 2011 23:25:28 +0000 (16:25 -0700)
committerLinus Torvalds <[email protected]>
Fri, 27 May 2011 00:12:35 +0000 (17:12 -0700)
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 <[email protected]>
Acked-by: Daisuke Nishimura <[email protected]>
Cc: Balbir Singh <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/memcontrol.c

index e41a6c26f1e7020c2bab73dc31295a1a855e0313..fc62c714f3b6983411e7ad9223a356a340efd029 100644 (file)
@@ -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);
                }
This page took 0.064313 seconds and 4 git commands to generate.