diff options
author | Tejun Heo <tj@kernel.org> | 2016-12-27 14:49:03 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-12-27 14:49:03 -0500 |
commit | e90cbebc3fa5caea4c8bfeb0d0157a0cee53efc7 (patch) | |
tree | 86c2bdab65cfde9766a6779979bd3836e71bdd74 /include/linux/cgroup-defs.h | |
parent | 0e67db2f9fe91937e798e3d7d22c50a8438187e1 (diff) |
cgroup add cftype->open/release() callbacks
Pipe the newly added kernfs->open/release() callbacks through cftype.
While at it, as cleanup operations now can be performed from
->release() instead of ->seq_stop(), make the latter optional.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Acked-by: Zefan Li <lizefan@huawei.com>
Diffstat (limited to 'include/linux/cgroup-defs.h')
-rw-r--r-- | include/linux/cgroup-defs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h index 861b4677fc5b..8a916dc96e84 100644 --- a/include/linux/cgroup-defs.h +++ b/include/linux/cgroup-defs.h @@ -388,6 +388,9 @@ struct cftype { struct list_head node; /* anchored at ss->cfts */ struct kernfs_ops *kf_ops; + int (*open)(struct kernfs_open_file *of); + void (*release)(struct kernfs_open_file *of); + /* * read_u64() is a shortcut for the common case of returning a * single integer. Use it in place of read() |