exit: fix misleading comment in forget_original_parent()

The commit 482a3767e5 ("exit: reparent: call forget_original_parent()
under tasklist_lock") moved the comment from exit_notify() to
forget_original_parent().  However, the forget_original_parent() only
handles (A), while (B) is handled in kill_orphaned_pgrp().  So remove the
unrelated part.

Link: https://lkml.kernel.org/r/20250615030930.58051-1-wangfushuai@baidu.com
Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Mateusz Guzik <mjguzik@gmail.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: wangfushuai <wangfushuai@baidu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Fushuai Wang 2025-06-15 11:09:30 +08:00 committed by Andrew Morton
parent ad2c8079e9
commit d71b90e5ba
1 changed files with 1 additions and 6 deletions

View File

@ -692,12 +692,7 @@ static void reparent_leader(struct task_struct *father, struct task_struct *p,
} }
/* /*
* This does two things: * Make init inherit all the child processes
*
* A. Make init inherit all the child processes
* B. Check to see if any process groups have become orphaned
* as a result of our exiting, and if they have any stopped
* jobs, send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2)
*/ */
static void forget_original_parent(struct task_struct *father, static void forget_original_parent(struct task_struct *father,
struct list_head *dead) struct list_head *dead)