diff options
| author | Tejun Heo <tj@kernel.org> | 2013-04-14 11:36:56 -0700 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-09-18 12:46:43 +0200 |
| commit | c928c80d2f7378e6f9050a26f809da9b26519394 (patch) | |
| tree | d3f389a3f106cbced7d7f0eac4d12b8f55619cff /include/linux | |
| parent | 3be20b8c17a1b7b7ffae840d6a625070f2c91b0d (diff) | |
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>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
