|
@@ -1365,7 +1365,6 @@ static int cgroup_remount(struct super_block *sb, int *flags, char *data)
|
|
|
if (opts.flags != root->flags ||
|
|
|
(opts.name && strcmp(opts.name, root->name))) {
|
|
|
ret = -EINVAL;
|
|
|
- drop_parsed_module_refcounts(opts.subsys_mask);
|
|
|
goto out_unlock;
|
|
|
}
|
|
|
|
|
@@ -1380,7 +1379,6 @@ static int cgroup_remount(struct super_block *sb, int *flags, char *data)
|
|
|
if (ret) {
|
|
|
/* rebind_subsystems failed, re-populate the removed files */
|
|
|
cgroup_populate_dir(cgrp, false, removed_mask);
|
|
|
- drop_parsed_module_refcounts(opts.subsys_mask);
|
|
|
goto out_unlock;
|
|
|
}
|
|
|
|
|
@@ -1395,6 +1393,8 @@ static int cgroup_remount(struct super_block *sb, int *flags, char *data)
|
|
|
mutex_unlock(&cgroup_root_mutex);
|
|
|
mutex_unlock(&cgroup_mutex);
|
|
|
mutex_unlock(&cgrp->dentry->d_inode->i_mutex);
|
|
|
+ if (ret)
|
|
|
+ drop_parsed_module_refcounts(opts.subsys_mask);
|
|
|
return ret;
|
|
|
}
|
|
|
|