cgroup: allow ->post_create() to fail
There could be cases where controllers want to do initialization operations which may fail from ->post_create(). This patch makes ->post_create() return -errno to indicate failure and online_css() relay such failures. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com> Cc: Glauber Costa <glommer@parallels.com>
This commit is contained in:
@@ -440,7 +440,7 @@ int cgroup_taskset_size(struct cgroup_taskset *tset);
|
||||
|
||||
struct cgroup_subsys {
|
||||
struct cgroup_subsys_state *(*create)(struct cgroup *cgrp);
|
||||
void (*post_create)(struct cgroup *cgrp);
|
||||
int (*post_create)(struct cgroup *cgrp);
|
||||
void (*pre_destroy)(struct cgroup *cgrp);
|
||||
void (*destroy)(struct cgroup *cgrp);
|
||||
int (*can_attach)(struct cgroup *cgrp, struct cgroup_taskset *tset);
|
||||
|
Reference in New Issue
Block a user