diff options
| -rw-r--r-- | kernel/cgroup.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index a5f75ac4e793..3f46165829a4 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
| @@ -1780,8 +1780,11 @@ static void cgroup_kill_sb(struct super_block *sb) | |||
| 1780 | * If @root doesn't have any mounts or children, start killing it. | 1780 | * If @root doesn't have any mounts or children, start killing it. |
| 1781 | * This prevents new mounts by disabling percpu_ref_tryget_live(). | 1781 | * This prevents new mounts by disabling percpu_ref_tryget_live(). |
| 1782 | * cgroup_mount() may wait for @root's release. | 1782 | * cgroup_mount() may wait for @root's release. |
| 1783 | * | ||
| 1784 | * And don't kill the default root. | ||
| 1783 | */ | 1785 | */ |
| 1784 | if (css_has_online_children(&root->cgrp.self)) | 1786 | if (css_has_online_children(&root->cgrp.self) || |
| 1787 | root == &cgrp_dfl_root) | ||
| 1785 | cgroup_put(&root->cgrp); | 1788 | cgroup_put(&root->cgrp); |
| 1786 | else | 1789 | else |
| 1787 | percpu_ref_kill(&root->cgrp.self.refcnt); | 1790 | percpu_ref_kill(&root->cgrp.self.refcnt); |
