]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
cgroup: restructure file creation / removal handling
authorTejun Heo <tj@kernel.org>
Fri, 18 Sep 2015 21:54:23 +0000 (17:54 -0400)
committerTejun Heo <tj@kernel.org>
Fri, 18 Sep 2015 21:54:23 +0000 (17:54 -0400)
commit4df8dc903161c03cd9bff9077d8427fefe808e6d
treeb2f8350d96ddba3d3950c70997b9ef6375576d55
parent1ada48387a31b437074aa8973ce81de6e8c60bde
cgroup: restructure file creation / removal handling

The file creation / removal path has always been a bit icky and the
planned notification update requires css during file creation.
Restructure as follows.

* cgroup_addrm_files() now takes both @css and @cgrp and is only
  called directly by other file handling functions.

* cgroup_populate/clear_dir() are replaced with
  css_populate/clear_dir() taking @css and @cgrp_override.
  @cgrp_override is used only when files needs to be created on /
  removed from a cgroup which isn't attached to @css which happens
  during subsystem rebinds.  Subsystem loops are moved to the callers.

* cgroup_add_file() now takes both @css and @cgrp.  @css isn't used
  yet but will be used by the planned notification update.

This patch doens't cause any behavior changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
kernel/cgroup.c