diff options
author | Tejun Heo <tj@kernel.org> | 2013-04-14 11:36:56 -0700 |
---|---|---|
committer | Maciej Wereski <m.wereski@partner.samsung.com> | 2014-12-29 09:31:37 +0100 |
commit | fa57f74d4219054ed604fc6149d992f26186b6a7 (patch) | |
tree | f9b04a03494657301de2d8ccb7e61c9f34f7b2d8 /Documentation/trace | |
parent | 67638106847b138776748cb543cddabe277b64e8 (diff) | |
download | linux-3.10-fa57f74d4219054ed604fc6149d992f26186b6a7.tar.gz linux-3.10-fa57f74d4219054ed604fc6149d992f26186b6a7.tar.bz2 linux-3.10-fa57f74d4219054ed604fc6149d992f26186b6a7.zip |
cgroup: refactor hierarchy_id handling
We're planning to converting hierarchy_ida to an idr and use it to
look up hierarchy from its id. As we want the mapping to happen
atomically with cgroupfs_root registration, this patch refactors
hierarchy_id init / exit so that ida operations happen inside
cgroup_[root_]mutex.
* s/init_root_id()/cgroup_init_root_id()/ and make it return 0 or
-errno like a normal function.
* Move hierarchy_id initialization from cgroup_root_from_opts() into
cgroup_mount() block where the root is confirmed to be used and
being registered while holding both mutexes.
* Split cgroup_drop_id() into cgroup_exit_root_id() and
cgroup_free_root(), so that ID release can happen before dropping
the mutexes in cgroup_kill_sb(). The latter expects hierarchy_id to
be exited before being invoked.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Change-Id: Ie1433632bcde96c359fd1d488a81cc3255ee92e6
Origin: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fa3ca07e96185aa1496b405472399a2a2a336a17
Backported-by: Maciej Wereski <m.wereski@partner.samsung.com>
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
Diffstat (limited to 'Documentation/trace')
0 files changed, 0 insertions, 0 deletions