]> git.baikalelectronics.ru Git - kernel.git/commit
exit: reparent: introduce find_child_reaper()
authorOleg Nesterov <oleg@redhat.com>
Wed, 10 Dec 2014 23:55:11 +0000 (15:55 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Dec 2014 01:41:17 +0000 (17:41 -0800)
commit7c23a2047018a3cb23b48bd02ec6fe0bc5a24ed8
tree8a8d8c701988e74bfea253b7f83f674fcc40cf35
parent2b4297c3bf3ffcbff126fafba21f8fc35c91b6c6
exit: reparent: introduce find_child_reaper()

find_new_reaper() does 2 completely different things.  Not only it finds a
reaper, it also updates pid_ns->child_reaper or kills the whole namespace
if the caller is ->child_reaper.

Now that has_child_subreaper logic doesn't depend on child_reaper check we
can move that pid_ns code into a separate helper.  IMHO this makes the
code more clean, and this allows the next changes.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Aaron Tomlin <atomlin@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Kay Sievers <kay@vrfy.org>
Cc: Lennart Poettering <lennart@poettering.net>
Cc: Sterling Alexander <stalexan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/exit.c