diff options
author | Divyesh Shah <dpshah@google.com> | 2010-04-16 10:10:51 +0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-04-16 10:10:51 +0400 |
commit | 8d2a91f8960b230b8bbcc4d97ed2015f5271c87d (patch) | |
tree | 54b742bd0ce37c1ec227178d23d7da347993a6b5 /block/blk-cgroup.c | |
parent | b6ac23af2c66e114d3a87ef28d56f1ceec283007 (diff) | |
download | linux-8d2a91f8960b230b8bbcc4d97ed2015f5271c87d.tar.xz |
blkio: Initialize blkg->stats_lock for the root cfqg too
This fixes the lockdep warning reported by Gui Jianfeng.
Signed-off-by: Divyesh Shah <dpshah@google.com>
Reviewed-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r-- | block/blk-cgroup.c | 7 |
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) } EXPORT_SYMBOL_GPL(cgroup_to_blkio_cgroup); -void blkio_group_init(struct blkio_group *blkg) -{ - spin_lock_init(&blkg->stats_lock); -} -EXPORT_SYMBOL_GPL(blkio_group_init); - /* * Add to the appropriate stat variable depending on the request type. * This should be called with the blkg->stats_lock held. @@ -349,6 +343,7 @@ void blkiocg_add_blkio_group(struct blkio_cgroup *blkcg, unsigned long flags; spin_lock_irqsave(&blkcg->lock, flags); + spin_lock_init(&blkg->stats_lock); rcu_assign_pointer(blkg->key, key); blkg->blkcg_id = css_id(&blkcg->css); hlist_add_head_rcu(&blkg->blkcg_node, &blkcg->blkg_list); |