aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r--block/blk-cgroup.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 80c1261a7d38..83930f65016a 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -86,12 +86,6 @@ struct blkio_cgroup *cgroup_to_blkio_cgroup(struct cgroup *cgroup)
86} 86}
87EXPORT_SYMBOL_GPL(cgroup_to_blkio_cgroup); 87EXPORT_SYMBOL_GPL(cgroup_to_blkio_cgroup);
88 88
89void blkio_group_init(struct blkio_group *blkg)
90{
91 spin_lock_init(&blkg->stats_lock);
92}
93EXPORT_SYMBOL_GPL(blkio_group_init);
94
95/* 89/*
96 * Add to the appropriate stat variable depending on the request type. 90 * Add to the appropriate stat variable depending on the request type.
97 * This should be called with the blkg->stats_lock held. 91 * This should be called with the blkg->stats_lock held.
@@ -349,6 +343,7 @@ void blkiocg_add_blkio_group(struct blkio_cgroup *blkcg,
349 unsigned long flags; 343 unsigned long flags;
350 344
351 spin_lock_irqsave(&blkcg->lock, flags); 345 spin_lock_irqsave(&blkcg->lock, flags);
346 spin_lock_init(&blkg->stats_lock);
352 rcu_assign_pointer(blkg->key, key); 347 rcu_assign_pointer(blkg->key, key);
353 blkg->blkcg_id = css_id(&blkcg->css); 348 blkg->blkcg_id = css_id(&blkcg->css);
354 hlist_add_head_rcu(&blkg->blkcg_node, &blkcg->blkg_list); 349 hlist_add_head_rcu(&blkg->blkcg_node, &blkcg->blkg_list);