summaryrefslogtreecommitdiff
path: root/kernel/cgroup/cgroup.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2019-01-17 00:15:11 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2019-02-28 03:29:31 -0500
commit8d2451f4994fa60a57617282bab91b98266a00b1 (patch)
tree1ce0f664c31fa7178c196063fb164a9793ba3659 /kernel/cgroup/cgroup.c
parentf5dfb5315d340abd71bec523be9b114d5ac410de (diff)
cgroup1: switch to option-by-option parsing
[dhowells should be the author - it's carved out of his patch] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/cgroup/cgroup.c')
-rw-r--r--kernel/cgroup/cgroup.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 33da9eef3ef4..faba00caa197 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -2083,15 +2083,6 @@ static int cgroup_parse_monolithic(struct fs_context *fc, void *data)
return parse_cgroup_root_flags(data, &ctx->flags);
}
-static int cgroup1_parse_monolithic(struct fs_context *fc, void *data)
-{
- struct cgroup_fs_context *ctx = cgroup_fc2context(fc);
-
- if (data)
- security_sb_eat_lsm_opts(data, &fc->security);
- return parse_cgroup1_options(data, ctx);
-}
-
static int cgroup_get_tree(struct fs_context *fc)
{
struct cgroup_namespace *ns = current->nsproxy->cgroup_ns;
@@ -2124,7 +2115,7 @@ static const struct fs_context_operations cgroup_fs_context_ops = {
static const struct fs_context_operations cgroup1_fs_context_ops = {
.free = cgroup_fs_context_free,
- .parse_monolithic = cgroup1_parse_monolithic,
+ .parse_param = cgroup1_parse_param,
.get_tree = cgroup1_get_tree,
.reconfigure = cgroup1_reconfigure,
};
@@ -2175,10 +2166,11 @@ static void cgroup_kill_sb(struct super_block *sb)
}
struct file_system_type cgroup_fs_type = {
- .name = "cgroup",
- .init_fs_context = cgroup_init_fs_context,
- .kill_sb = cgroup_kill_sb,
- .fs_flags = FS_USERNS_MOUNT,
+ .name = "cgroup",
+ .init_fs_context = cgroup_init_fs_context,
+ .parameters = &cgroup1_fs_parameters,
+ .kill_sb = cgroup_kill_sb,
+ .fs_flags = FS_USERNS_MOUNT,
};
static struct file_system_type cgroup2_fs_type = {