aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-09-07 19:15:20 -0400
committerJens Axboe <axboe@fb.com>2014-09-08 11:55:37 -0400
commitf4da80727cfbc3590d95ff17ef8db96e6f1483a4 (patch)
treecd073c26cb66e6d2f8640c3aabb412ff22946b63 /block/blk-cgroup.c
parent55872c5a3c01f0fe7b5298d19e24e237f5b5ff06 (diff)
blkcg: remove blkcg->id
blkcg->id is a unique id given to each blkcg; however, the cgroup_subsys_state which each blkcg embeds already has ->serial_nr which can be used for the same purpose. Drop blkcg->id and replace its uses with blkcg->css.serial_nr. Rename cfq_cgroup->blkcg_id to ->blkcg_serial_nr and @id in check_blkcg_changed() to @serial_nr for consistency. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r--block/blk-cgroup.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index e17da947f6bd..0ac817b750db 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -822,7 +822,6 @@ static void blkcg_css_free(struct cgroup_subsys_state *css)
822static struct cgroup_subsys_state * 822static struct cgroup_subsys_state *
823blkcg_css_alloc(struct cgroup_subsys_state *parent_css) 823blkcg_css_alloc(struct cgroup_subsys_state *parent_css)
824{ 824{
825 static atomic64_t id_seq = ATOMIC64_INIT(0);
826 struct blkcg *blkcg; 825 struct blkcg *blkcg;
827 826
828 if (!parent_css) { 827 if (!parent_css) {
@@ -836,7 +835,6 @@ blkcg_css_alloc(struct cgroup_subsys_state *parent_css)
836 835
837 blkcg->cfq_weight = CFQ_WEIGHT_DEFAULT; 836 blkcg->cfq_weight = CFQ_WEIGHT_DEFAULT;
838 blkcg->cfq_leaf_weight = CFQ_WEIGHT_DEFAULT; 837 blkcg->cfq_leaf_weight = CFQ_WEIGHT_DEFAULT;
839 blkcg->id = atomic64_inc_return(&id_seq); /* root is 0, start from 1 */
840done: 838done:
841 spin_lock_init(&blkcg->lock); 839 spin_lock_init(&blkcg->lock);
842 INIT_RADIX_TREE(&blkcg->blkg_tree, GFP_ATOMIC); 840 INIT_RADIX_TREE(&blkcg->blkg_tree, GFP_ATOMIC);