diff options
author | Tejun Heo <tj@kernel.org> | 2014-05-13 12:16:21 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-05-13 12:16:21 -0400 |
commit | b41686401e501430ffe93b575ef7959d2ecc6f2e (patch) | |
tree | 9d38bb6b2878c3107aaad43ab53ac145c4ed9a9e /kernel/cpuset.c | |
parent | ec903c0c858e4963a9e0724bdcadfa837253341c (diff) | |
download | linux-b41686401e501430ffe93b575ef7959d2ecc6f2e.tar.gz linux-b41686401e501430ffe93b575ef7959d2ecc6f2e.tar.bz2 linux-b41686401e501430ffe93b575ef7959d2ecc6f2e.zip |
cgroup: implement cftype->write()
During the recent conversion to kernfs, cftype's seq_file operations
are updated so that they are directly mapped to kernfs operations and
thus can fully access the associated kernfs and cgroup contexts;
however, write path hasn't seen similar updates and none of the
existing write operations has access to, for example, the associated
kernfs_open_file.
Let's introduce a new operation cftype->write() which maps directly to
the kernfs write operation and has access to all the arguments and
contexts. This will replace ->write_string() and ->trigger() and ease
manipulation of kernfs active protection from cgroup file operations.
Two accessors - of_cft() and of_css() - are introduced to enable
accessing the associated cgroup context from cftype->write() which
only takes kernfs_open_file for the context information. The
accessors for seq_file operations - seq_cft() and seq_css() - are
rewritten to wrap the of_ accessors.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'kernel/cpuset.c')
0 files changed, 0 insertions, 0 deletions