blkcg: move refcnt to blkcg core
commit1adaf3dde37a8b9b59ea59c5f58fed7761178383
authorTejun Heo <tj@kernel.org>
Mon, 5 Mar 2012 21:15:15 +0000 (5 13:15 -0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 6 Mar 2012 20:27:23 +0000 (6 21:27 +0100)
treee4a46485b1bf0370aa41a5b9a8f138fba34c9d23
parent0381411e4b1a52cee134eb73750e5e3cc1155d09
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