]> git.baikalelectronics.ru Git - kernel.git/commit
blkcg: let blkio_group point to blkio_cgroup directly
authorTejun Heo <tj@kernel.org>
Mon, 5 Mar 2012 21:15:11 +0000 (13:15 -0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 6 Mar 2012 20:27:23 +0000 (21:27 +0100)
commit9211cac9647c932f7d1c15b4a923bb284b5bc9b5
tree1daf4d9fc8d03ebbc88ceedb7abeec46d8c71df3
parent01f1d6adbe213a538b644542c21d61c06f33cfe3
blkcg: let blkio_group point to blkio_cgroup directly

Currently, blkg points to the associated blkcg via its css_id.  This
unnecessarily complicates dereferencing blkcg.  Let blkg hold a
reference to the associated blkcg and point directly to it and disable
css_id on blkio_subsys.

This change requires splitting blkiocg_destroy() into
blkiocg_pre_destroy() and blkiocg_destroy() so that all blkg's can be
destroyed and all the blkcg references held by them dropped during
cgroup removal.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-cgroup.c
block/blk-cgroup.h
block/blk-throttle.c
block/cfq-iosched.c