diff options
author | Tejun Heo <tj@kernel.org> | 2014-02-11 11:52:49 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-02-11 11:52:49 -0500 |
commit | 59f5296b51b86718dd6eecf0a268b2f1a1ec0a2d (patch) | |
tree | 0854f2b46c93190b8fb5bb1e0a992f1e5b77320e /include | |
parent | b1664924062393bb048203bd4622e0b1c9e1d328 (diff) | |
download | blackbird-op-linux-59f5296b51b86718dd6eecf0a268b2f1a1ec0a2d.tar.gz blackbird-op-linux-59f5296b51b86718dd6eecf0a268b2f1a1ec0a2d.zip |
cgroup: misc preps for kernfs conversion
* Un-inline seq_css(). After kernfs conversion, the function will
need to dereference internal data structures.
* Add cgroup_get/put_root() and replace direct super_block->s_active
manipulatinos with them. These will be converted to kernfs_root
refcnting.
* Add cgroup_get/put() and replace dget/put() on cgrp->dentry with
them. These will be converted to kernfs refcnting.
* Update current_css_set_cg_links_read() to use cgroup_name() instead
of reaching into the dentry name. The end result is the same.
These changes don't make functional differences but will make
transition to kernfs easier.
v2: Rebased on top of 0ab02ca8f887 ("cgroup: protect modifications to
cgroup_idr with cgroup_mutex").
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/cgroup.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 06f577764414..523277871913 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -516,18 +516,14 @@ static inline ino_t cgroup_ino(struct cgroup *cgrp) return 0; } -static inline struct cgroup_subsys_state *seq_css(struct seq_file *seq) -{ - struct cgroup_open_file *of = seq->private; - return of->cfe->css; -} - static inline struct cftype *seq_cft(struct seq_file *seq) { struct cgroup_open_file *of = seq->private; return of->cfe->type; } +struct cgroup_subsys_state *seq_css(struct seq_file *seq); + int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts); int cgroup_rm_cftypes(struct cftype *cfts); |