]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: use restart_syscall() for mount retries
authorTejun Heo <tj@kernel.org>
Wed, 14 May 2014 13:15:00 +0000 (09:15 -0400)
committerTejun Heo <tj@kernel.org>
Wed, 14 May 2014 13:15:00 +0000 (09:15 -0400)
commit5c74ae40a7a9c3d68144929e05c17fd62aaa4c10
tree29f4a69bd8e544af7254fb24e69fedbfd4899aaa
parent973b92044b4a47d76086bbbc648d1793fc5db745
cgroup: use restart_syscall() for mount retries

cgroup_mount() uses dumb delay-and-retry logic to wait for cgroup_root
which is being destroyed.  The retry currently loops inside
cgroup_mount() proper.  This patch makes it return with
restart_syscall() instead so that retry travels out to userland
boundary.

This slightly simplifies the logic and more importantly makes the
retry logic behave better when the wait for some reason becomes
lengthy or infinite by allowing the operation to be suspended or
terminated from userland.

v2: The original patch forgot to free memory allocated for @opts.
    Fixed.  Caught by Li Zefan.

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