]> git.baikalelectronics.ru Git - kernel.git/commit
blkcg: move refcnt to blkcg core
authorTejun Heo <tj@kernel.org>
Mon, 5 Mar 2012 21:15:15 +0000 (13:15 -0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 6 Mar 2012 20:27:23 +0000 (21:27 +0100)
commit138df67a5b32ef22e4d051d3ca71036a1bb17660
treee4a46485b1bf0370aa41a5b9a8f138fba34c9d23
parentb36adfa7c61c23961063de0c55342be1d26e805f
blkcg: move refcnt to blkcg core

Currently, blkcg policy implementations manage blkg refcnt duplicating
mostly identical code in both policies.  This patch moves refcnt to
blkg and let blkcg core handle refcnt and freeing of blkgs.

* cfq blkgs now also get freed via RCU.

* cfq blkgs lose RB_EMPTY_ROOT() sanity check on blkg free.  If
  necessary, we can add blkio_exit_group_fn() to resurrect this.

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