]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - block/blk-cgroup.c
blkcg: reorganize blkg_lookup_create() and friends
authorTejun Heo <tj@kernel.org>
Wed, 9 Jan 2013 16:05:10 +0000 (08:05 -0800)
committerTejun Heo <tj@kernel.org>
Wed, 9 Jan 2013 16:05:10 +0000 (08:05 -0800)
commit86cde6b62313dd221c2e5935db02de7234cb4164
tree879485988325bb8d97882cac82056bff434b000e
parent356d2e581032b686da0854c7f17de2027c872762
blkcg: reorganize blkg_lookup_create() and friends

Reorganize such that

* __blkg_lookup() takes bool param @update_hint to determine whether
  to update hint.

* __blkg_lookup_create() no longer performs lookup before trying to
  create.  Renamed to blkg_create().

* blkg_lookup_create() now performs lookup and then invokes
  blkg_create() if lookup fails.

* root_blkg creation in blkcg_activate_policy() updated accordingly.
  Note that blkcg_activate_policy() no longer updates lookup hint if
  root_blkg already exists.

Except for the last lookup hint bit which is immaterial, this is pure
reorganization and doesn't introduce any visible behavior change.
This is to prepare for proper hierarchy support.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
block/blk-cgroup.c