|
@@ -1313,7 +1313,8 @@ static int cgroup_remount(struct super_block *sb, int *flags, char *data)
|
|
|
goto out_unlock;
|
|
|
}
|
|
|
|
|
|
- /* (re)populate subsystem files */
|
|
|
+ /* clear out any existing files and repopulate subsystem files */
|
|
|
+ cgroup_clear_directory(cgrp->dentry);
|
|
|
cgroup_populate_dir(cgrp);
|
|
|
|
|
|
if (opts.release_agent)
|
|
@@ -3644,9 +3645,6 @@ static int cgroup_populate_dir(struct cgroup *cgrp)
|
|
|
int err;
|
|
|
struct cgroup_subsys *ss;
|
|
|
|
|
|
- /* First clear out any existing files */
|
|
|
- cgroup_clear_directory(cgrp->dentry);
|
|
|
-
|
|
|
err = cgroup_add_files(cgrp, NULL, files, ARRAY_SIZE(files));
|
|
|
if (err < 0)
|
|
|
return err;
|