diff options
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r-- | kernel/cgroup.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 40e0df6c2a2f..a32f9432666c 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -554,7 +554,6 @@ static struct css_set *find_existing_css_set( | |||
554 | { | 554 | { |
555 | int i; | 555 | int i; |
556 | struct cgroupfs_root *root = cgrp->root; | 556 | struct cgroupfs_root *root = cgrp->root; |
557 | struct hlist_node *node; | ||
558 | struct css_set *cg; | 557 | struct css_set *cg; |
559 | unsigned long key; | 558 | unsigned long key; |
560 | 559 | ||
@@ -577,7 +576,7 @@ static struct css_set *find_existing_css_set( | |||
577 | } | 576 | } |
578 | 577 | ||
579 | key = css_set_hash(template); | 578 | key = css_set_hash(template); |
580 | hash_for_each_possible(css_set_table, cg, node, hlist, key) { | 579 | hash_for_each_possible(css_set_table, cg, hlist, key) { |
581 | if (!compare_css_sets(cg, oldcg, cgrp, template)) | 580 | if (!compare_css_sets(cg, oldcg, cgrp, template)) |
582 | continue; | 581 | continue; |
583 | 582 | ||
@@ -1611,7 +1610,6 @@ static struct dentry *cgroup_mount(struct file_system_type *fs_type, | |||
1611 | struct cgroupfs_root *existing_root; | 1610 | struct cgroupfs_root *existing_root; |
1612 | const struct cred *cred; | 1611 | const struct cred *cred; |
1613 | int i; | 1612 | int i; |
1614 | struct hlist_node *node; | ||
1615 | struct css_set *cg; | 1613 | struct css_set *cg; |
1616 | 1614 | ||
1617 | BUG_ON(sb->s_root != NULL); | 1615 | BUG_ON(sb->s_root != NULL); |
@@ -1666,7 +1664,7 @@ static struct dentry *cgroup_mount(struct file_system_type *fs_type, | |||
1666 | /* Link the top cgroup in this hierarchy into all | 1664 | /* Link the top cgroup in this hierarchy into all |
1667 | * the css_set objects */ | 1665 | * the css_set objects */ |
1668 | write_lock(&css_set_lock); | 1666 | write_lock(&css_set_lock); |
1669 | hash_for_each(css_set_table, i, node, cg, hlist) | 1667 | hash_for_each(css_set_table, i, cg, hlist) |
1670 | link_css_set(&tmp_cg_links, cg, root_cgrp); | 1668 | link_css_set(&tmp_cg_links, cg, root_cgrp); |
1671 | write_unlock(&css_set_lock); | 1669 | write_unlock(&css_set_lock); |
1672 | 1670 | ||
@@ -4493,7 +4491,7 @@ int __init_or_module cgroup_load_subsys(struct cgroup_subsys *ss) | |||
4493 | { | 4491 | { |
4494 | struct cgroup_subsys_state *css; | 4492 | struct cgroup_subsys_state *css; |
4495 | int i, ret; | 4493 | int i, ret; |
4496 | struct hlist_node *node, *tmp; | 4494 | struct hlist_node *tmp; |
4497 | struct css_set *cg; | 4495 | struct css_set *cg; |
4498 | unsigned long key; | 4496 | unsigned long key; |
4499 | 4497 | ||
@@ -4561,7 +4559,7 @@ int __init_or_module cgroup_load_subsys(struct cgroup_subsys *ss) | |||
4561 | * this is all done under the css_set_lock. | 4559 | * this is all done under the css_set_lock. |
4562 | */ | 4560 | */ |
4563 | write_lock(&css_set_lock); | 4561 | write_lock(&css_set_lock); |
4564 | hash_for_each_safe(css_set_table, i, node, tmp, cg, hlist) { | 4562 | hash_for_each_safe(css_set_table, i, tmp, cg, hlist) { |
4565 | /* skip entries that we already rehashed */ | 4563 | /* skip entries that we already rehashed */ |
4566 | if (cg->subsys[ss->subsys_id]) | 4564 | if (cg->subsys[ss->subsys_id]) |
4567 | continue; | 4565 | continue; |
@@ -4571,7 +4569,7 @@ int __init_or_module cgroup_load_subsys(struct cgroup_subsys *ss) | |||
4571 | cg->subsys[ss->subsys_id] = css; | 4569 | cg->subsys[ss->subsys_id] = css; |
4572 | /* recompute hash and restore entry */ | 4570 | /* recompute hash and restore entry */ |
4573 | key = css_set_hash(cg->subsys); | 4571 | key = css_set_hash(cg->subsys); |
4574 | hash_add(css_set_table, node, key); | 4572 | hash_add(css_set_table, &cg->hlist, key); |
4575 | } | 4573 | } |
4576 | write_unlock(&css_set_lock); | 4574 | write_unlock(&css_set_lock); |
4577 | 4575 | ||