summaryrefslogtreecommitdiffstats
path: root/kernel/cgroup/cgroup.c
diff options
context:
space:
mode:
authorAl Viro2019-01-17 03:23:02 +0100
committerAl Viro2019-02-28 09:29:30 +0100
commit7feeef58690a5ea8c5033d43e696ef41b28d82eb (patch)
tree5cb755e3651f3044ab700c509da414a6223bce35 /kernel/cgroup/cgroup.c
parentcgroup: start switching to fs_context (diff)
downloadkernel-qcow2-linux-7feeef58690a5ea8c5033d43e696ef41b28d82eb.tar.gz
kernel-qcow2-linux-7feeef58690a5ea8c5033d43e696ef41b28d82eb.tar.xz
kernel-qcow2-linux-7feeef58690a5ea8c5033d43e696ef41b28d82eb.zip
cgroup: fold cgroup1_mount() into cgroup1_get_tree()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/cgroup/cgroup.c')
-rw-r--r--kernel/cgroup/cgroup.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 7f7db5f967e3..0652f74064a2 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -2117,25 +2117,6 @@ static int cgroup_get_tree(struct fs_context *fc)
return 0;
}
-static int cgroup1_get_tree(struct fs_context *fc)
-{
- struct cgroup_namespace *ns = current->nsproxy->cgroup_ns;
- struct cgroup_fs_context *ctx = cgroup_fc2context(fc);
- struct dentry *root;
-
- /* Check if the caller has permission to mount. */
- if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN))
- return -EPERM;
-
- root = cgroup1_mount(&cgroup_fs_type, fc->sb_flags, ctx->data,
- CGROUP_SUPER_MAGIC, ns);
- if (IS_ERR(root))
- return PTR_ERR(root);
-
- fc->root = root;
- return 0;
-}
-
static const struct fs_context_operations cgroup_fs_context_ops = {
.free = cgroup_fs_context_free,
.parse_monolithic = cgroup_parse_monolithic,