diff options
-rw-r--r-- | kernel/cgroup.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 8da9048078c5..a04932281bc9 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -1767,7 +1767,7 @@ int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen) | |||
1767 | rcu_lockdep_assert(rcu_read_lock_held() || cgroup_lock_is_held(), | 1767 | rcu_lockdep_assert(rcu_read_lock_held() || cgroup_lock_is_held(), |
1768 | "cgroup_path() called without proper locking"); | 1768 | "cgroup_path() called without proper locking"); |
1769 | 1769 | ||
1770 | if (!dentry || cgrp == dummytop) { | 1770 | if (cgrp == dummytop) { |
1771 | /* | 1771 | /* |
1772 | * Inactive subsystems have no dentry for their root | 1772 | * Inactive subsystems have no dentry for their root |
1773 | * cgroup | 1773 | * cgroup |
@@ -4153,6 +4153,9 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry, | |||
4153 | 4153 | ||
4154 | init_cgroup_housekeeping(cgrp); | 4154 | init_cgroup_housekeeping(cgrp); |
4155 | 4155 | ||
4156 | dentry->d_fsdata = cgrp; | ||
4157 | cgrp->dentry = dentry; | ||
4158 | |||
4156 | cgrp->parent = parent; | 4159 | cgrp->parent = parent; |
4157 | cgrp->root = parent->root; | 4160 | cgrp->root = parent->root; |
4158 | cgrp->top_cgroup = parent->top_cgroup; | 4161 | cgrp->top_cgroup = parent->top_cgroup; |
@@ -4190,8 +4193,6 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry, | |||
4190 | lockdep_assert_held(&dentry->d_inode->i_mutex); | 4193 | lockdep_assert_held(&dentry->d_inode->i_mutex); |
4191 | 4194 | ||
4192 | /* allocation complete, commit to creation */ | 4195 | /* allocation complete, commit to creation */ |
4193 | dentry->d_fsdata = cgrp; | ||
4194 | cgrp->dentry = dentry; | ||
4195 | list_add_tail(&cgrp->allcg_node, &root->allcg_list); | 4196 | list_add_tail(&cgrp->allcg_node, &root->allcg_list); |
4196 | list_add_tail_rcu(&cgrp->sibling, &cgrp->parent->children); | 4197 | list_add_tail_rcu(&cgrp->sibling, &cgrp->parent->children); |
4197 | root->number_of_cgroups++; | 4198 | root->number_of_cgroups++; |