]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: disallow rename(2) if sane_behavior
authorTejun Heo <tj@kernel.org>
Fri, 14 Jun 2013 18:18:22 +0000 (11:18 -0700)
committerTejun Heo <tj@kernel.org>
Tue, 18 Jun 2013 15:14:23 +0000 (08:14 -0700)
commit731a662d53e7dead73995f0f642d17f75e9156f6
tree6195edbc8abb6645d39a4986fd2d48c89bbefa92
parent816d25cff4d051c4b12f3d3f99168e130281c47e
cgroup: disallow rename(2) if sane_behavior

cgroup's rename(2) isn't a proper migration implementation - it can't
move the cgroup to a different parent in the hierarchy.  All it can do
is swapping the name string for that cgroup.  This isn't useful and
can mislead users to think that cgroup supports proper cgroup-level
migration.  Disallow rename(2) if sane_behavior.

v2: Fail with -EPERM instead of -EINVAL so that it matches the vfs
    return value when ->rename is not implemented as suggested by Li.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
include/linux/cgroup.h
kernel/cgroup.c