[PATCH] kill SET_LINKS/REMOVE_LINKS

Both SET_LINKS() and SET_LINKS/REMOVE_LINKS() have exactly one caller, and
these callers already check thread_group_leader().

This patch kills theese macros, they mix two different things: setting
process's parent and registering it in init_task.tasks list.  Callers are
updated to do these actions by hand.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Oleg Nesterov 2006-03-28 16:11:06 -08:00 committed by Linus Torvalds
parent 9b678ece42
commit c97d98931a
3 changed files with 6 additions and 14 deletions

View file

@ -54,11 +54,13 @@ static void __unhash_process(struct task_struct *p)
if (thread_group_leader(p)) {
detach_pid(p, PIDTYPE_PGID);
detach_pid(p, PIDTYPE_SID);
list_del_init(&p->tasks);
if (p->pid)
__get_cpu_var(process_counts)--;
}
REMOVE_LINKS(p);
remove_parent(p);
}
void release_task(struct task_struct * p)