diff options
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r-- | kernel/cgroup.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 2ee9ec3051b2..688dd02af985 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -5221,6 +5221,11 @@ err_free_css: | |||
5221 | return ERR_PTR(err); | 5221 | return ERR_PTR(err); |
5222 | } | 5222 | } |
5223 | 5223 | ||
5224 | /* | ||
5225 | * The returned cgroup is fully initialized including its control mask, but | ||
5226 | * it isn't associated with its kernfs_node and doesn't have the control | ||
5227 | * mask applied. | ||
5228 | */ | ||
5224 | static struct cgroup *cgroup_create(struct cgroup *parent) | 5229 | static struct cgroup *cgroup_create(struct cgroup *parent) |
5225 | { | 5230 | { |
5226 | struct cgroup_root *root = parent->root; | 5231 | struct cgroup_root *root = parent->root; |
@@ -5288,11 +5293,6 @@ static struct cgroup *cgroup_create(struct cgroup *parent) | |||
5288 | 5293 | ||
5289 | cgroup_propagate_control(cgrp); | 5294 | cgroup_propagate_control(cgrp); |
5290 | 5295 | ||
5291 | /* @cgrp doesn't have dir yet so the following will only create csses */ | ||
5292 | ret = cgroup_apply_control_enable(cgrp); | ||
5293 | if (ret) | ||
5294 | goto out_destroy; | ||
5295 | |||
5296 | return cgrp; | 5296 | return cgrp; |
5297 | 5297 | ||
5298 | out_cancel_ref: | 5298 | out_cancel_ref: |
@@ -5300,9 +5300,6 @@ out_cancel_ref: | |||
5300 | out_free_cgrp: | 5300 | out_free_cgrp: |
5301 | kfree(cgrp); | 5301 | kfree(cgrp); |
5302 | return ERR_PTR(ret); | 5302 | return ERR_PTR(ret); |
5303 | out_destroy: | ||
5304 | cgroup_destroy_locked(cgrp); | ||
5305 | return ERR_PTR(ret); | ||
5306 | } | 5303 | } |
5307 | 5304 | ||
5308 | static int cgroup_mkdir(struct kernfs_node *parent_kn, const char *name, | 5305 | static int cgroup_mkdir(struct kernfs_node *parent_kn, const char *name, |