aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 2a9926275f80..38b136553044 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2699,13 +2699,14 @@ static int cgroup_add_file(struct cgroup *cgrp, struct cgroup_subsys *subsys,
2699 goto out; 2699 goto out;
2700 } 2700 }
2701 2701
2702 cfe->type = (void *)cft;
2703 cfe->dentry = dentry;
2704 dentry->d_fsdata = cfe;
2705 simple_xattrs_init(&cfe->xattrs);
2706
2702 mode = cgroup_file_mode(cft); 2707 mode = cgroup_file_mode(cft);
2703 error = cgroup_create_file(dentry, mode | S_IFREG, cgrp->root->sb); 2708 error = cgroup_create_file(dentry, mode | S_IFREG, cgrp->root->sb);
2704 if (!error) { 2709 if (!error) {
2705 cfe->type = (void *)cft;
2706 cfe->dentry = dentry;
2707 dentry->d_fsdata = cfe;
2708 simple_xattrs_init(&cfe->xattrs);
2709 list_add_tail(&cfe->node, &parent->files); 2710 list_add_tail(&cfe->node, &parent->files);
2710 cfe = NULL; 2711 cfe = NULL;
2711 } 2712 }