aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup/cgroup-v1.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2019-01-17 02:25:51 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2019-02-28 03:29:32 -0500
commitcf6299b1d00555cd10dc30d95b300d7084128a2c (patch)
treef4cd581ee037732a736b70e1fffa220e012be512 /kernel/cgroup/cgroup-v1.c
parentcgroup2: switch to option-by-option parsing (diff)
downloadlinux-dev-cf6299b1d00555cd10dc30d95b300d7084128a2c.tar.xz
linux-dev-cf6299b1d00555cd10dc30d95b300d7084128a2c.zip
cgroup: stash cgroup_root reference into cgroup_fs_context
Note that this reference is *NOT* contributing to refcount of cgroup_root in question and is valid only until cgroup_do_mount() returns. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to '')
-rw-r--r--kernel/cgroup/cgroup-v1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c
index 725e9f6fe80d..45a198c63d6e 100644
--- a/kernel/cgroup/cgroup-v1.c
+++ b/kernel/cgroup/cgroup-v1.c
@@ -1208,6 +1208,7 @@ int cgroup1_get_tree(struct fs_context *fc)
if (root->flags ^ ctx->flags)
pr_warn("new mount options do not match the existing superblock, will be ignored\n");
+ ctx->root = root;
ret = 0;
goto out_unlock;
}
@@ -1234,7 +1235,8 @@ int cgroup1_get_tree(struct fs_context *fc)
goto out_unlock;
}
- init_cgroup_root(root, ctx);
+ ctx->root = root;
+ init_cgroup_root(ctx);
ret = cgroup_setup_root(root, ctx->subsys_mask);
if (ret)