diff options
author | Bob Liu <lliubbo@gmail.com> | 2012-01-12 17:19:04 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-12 20:13:07 -0800 |
commit | 3ed28fa1080c73747ce17f2025b28b062fb5aa7f (patch) | |
tree | f4eab7da502fb728fac728220bc1f296ee04dca1 /mm | |
parent | 38c5d72f3ebe5ddd57d2f08dc035070fc6c9a287 (diff) | |
download | linux-stable-3ed28fa1080c73747ce17f2025b28b062fb5aa7f.tar.gz linux-stable-3ed28fa1080c73747ce17f2025b28b062fb5aa7f.tar.bz2 linux-stable-3ed28fa1080c73747ce17f2025b28b062fb5aa7f.zip |
memcg: cleanup for_each_node_state()
We already have for_each_node(node) define in nodemask.h, better to use it.
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memcontrol.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index ff051ee8fb4b..609c49f492e6 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -565,7 +565,7 @@ static void mem_cgroup_remove_from_trees(struct mem_cgroup *memcg) struct mem_cgroup_per_zone *mz; struct mem_cgroup_tree_per_zone *mctz; - for_each_node_state(node, N_POSSIBLE) { + for_each_node(node) { for (zone = 0; zone < MAX_NR_ZONES; zone++) { mz = mem_cgroup_zoneinfo(memcg, node, zone); mctz = soft_limit_tree_node_zone(node, zone); @@ -4818,7 +4818,7 @@ static void __mem_cgroup_free(struct mem_cgroup *memcg) mem_cgroup_remove_from_trees(memcg); free_css_id(&mem_cgroup_subsys, &memcg->css); - for_each_node_state(node, N_POSSIBLE) + for_each_node(node) free_mem_cgroup_per_zone_info(memcg, node); free_percpu(memcg->stat); @@ -4877,7 +4877,7 @@ static int mem_cgroup_soft_limit_tree_init(void) struct mem_cgroup_tree_per_zone *rtpz; int tmp, node, zone; - for_each_node_state(node, N_POSSIBLE) { + for_each_node(node) { tmp = node; if (!node_state(node, N_NORMAL_MEMORY)) tmp = -1; @@ -4896,7 +4896,7 @@ static int mem_cgroup_soft_limit_tree_init(void) return 0; err_cleanup: - for_each_node_state(node, N_POSSIBLE) { + for_each_node(node) { if (!soft_limit_tree.rb_tree_per_node[node]) break; kfree(soft_limit_tree.rb_tree_per_node[node]); @@ -4917,7 +4917,7 @@ mem_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cont) if (!memcg) return ERR_PTR(error); - for_each_node_state(node, N_POSSIBLE) + for_each_node(node) if (alloc_mem_cgroup_per_zone_info(memcg, node)) goto free_out; |