diff options
author | Tejun Heo <tj@kernel.org> | 2016-12-27 20:49:07 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-12-27 20:49:07 +0100 |
commit | fa069904dd38c2d8e121a3c7e37f8daaddb6dafa (patch) | |
tree | 770d75ea020938331ac3d2150ea1ec3848d7a067 /kernel/cgroup/cgroup-v1.c | |
parent | cgroup: refactor mount path and clearly distinguish v1 and v2 paths (diff) | |
download | linux-fa069904dd38c2d8e121a3c7e37f8daaddb6dafa.tar.xz linux-fa069904dd38c2d8e121a3c7e37f8daaddb6dafa.zip |
cgroup: separate out cgroup1_kf_syscall_ops
Currently, cgroup_kf_syscall_ops is shared by v1 and v2 and the
specific methods test the version and take different actions. Split
out v1 functions and put them in cgroup1_kf_syscall_ops and remove the
now unnecessary explicit branches in specific methods.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Acked-by: Zefan Li <lizefan@huawei.com>
Diffstat (limited to 'kernel/cgroup/cgroup-v1.c')
-rw-r--r-- | kernel/cgroup/cgroup-v1.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c index 7af745a46f91..0b2c24f0b310 100644 --- a/kernel/cgroup/cgroup-v1.c +++ b/kernel/cgroup/cgroup-v1.c @@ -800,8 +800,8 @@ out_free: /* * cgroup_rename - Only allow simple rename of directories in place. */ -int cgroup_rename(struct kernfs_node *kn, struct kernfs_node *new_parent, - const char *new_name_str) +int cgroup1_rename(struct kernfs_node *kn, struct kernfs_node *new_parent, + const char *new_name_str) { struct cgroup *cgrp = kn->priv; int ret; @@ -812,13 +812,6 @@ int cgroup_rename(struct kernfs_node *kn, struct kernfs_node *new_parent, return -EIO; /* - * This isn't a proper migration and its usefulness is very - * limited. Disallow on the default hierarchy. - */ - if (cgroup_on_dfl(cgrp)) - return -EPERM; - - /* * We're gonna grab cgroup_mutex which nests outside kernfs * active_ref. kernfs_rename() doesn't require active_ref * protection. Break them before grabbing cgroup_mutex. |