diff options
| -rw-r--r-- | kernel/cgroup.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 192d762ec1f4..bd4de465d5a9 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
| @@ -848,9 +848,12 @@ static void cgroup_free_fn(struct work_struct *work) | |||
| 848 | */ | 848 | */ |
| 849 | dput(cgrp->parent->dentry); | 849 | dput(cgrp->parent->dentry); |
| 850 | 850 | ||
| 851 | ida_simple_remove(&cgrp->root->cgroup_ida, cgrp->id); | ||
| 852 | |||
| 851 | /* | 853 | /* |
| 852 | * Drop the active superblock reference that we took when we | 854 | * Drop the active superblock reference that we took when we |
| 853 | * created the cgroup | 855 | * created the cgroup. This will free cgrp->root, if we are |
| 856 | * holding the last reference to @sb. | ||
| 854 | */ | 857 | */ |
| 855 | deactivate_super(cgrp->root->sb); | 858 | deactivate_super(cgrp->root->sb); |
| 856 | 859 | ||
| @@ -862,7 +865,6 @@ static void cgroup_free_fn(struct work_struct *work) | |||
| 862 | 865 | ||
| 863 | simple_xattrs_free(&cgrp->xattrs); | 866 | simple_xattrs_free(&cgrp->xattrs); |
| 864 | 867 | ||
| 865 | ida_simple_remove(&cgrp->root->cgroup_ida, cgrp->id); | ||
| 866 | kfree(rcu_dereference_raw(cgrp->name)); | 868 | kfree(rcu_dereference_raw(cgrp->name)); |
| 867 | kfree(cgrp); | 869 | kfree(cgrp); |
| 868 | } | 870 | } |
