Commit 8fafabd8 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

[PATCH] remove add_parent()'s parent argument

add_parent(p, parent) is always called with parent == p->parent, and it makes
no sense to do it differently.  This patch removes this argument.

No changes in affected .o files.
Signed-off-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d799f035
......@@ -603,7 +603,7 @@ asmlinkage int irix_waitsys(int type, int pid,
/* move to end of parent's list to avoid starvation */
write_lock_irq(&tasklist_lock);
remove_parent(p);
add_parent(p, p->parent);
add_parent(p);
write_unlock_irq(&tasklist_lock);
retval = ru ? getrusage(p, RUSAGE_BOTH, ru) : 0;
if (retval)
......@@ -643,7 +643,7 @@ asmlinkage int irix_waitsys(int type, int pid,
write_lock_irq(&tasklist_lock);
remove_parent(p);
p->parent = p->real_parent;
add_parent(p, p->parent);
add_parent(p);
do_notify_parent(p, SIGCHLD);
write_unlock_irq(&tasklist_lock);
} else
......
......@@ -725,8 +725,8 @@ static int de_thread(struct task_struct *tsk)
current->group_leader = current;
leader->group_leader = leader;
add_parent(current, current->parent);
add_parent(leader, leader->parent);
add_parent(current);
add_parent(leader);
if (ptrace) {
current->ptrace = ptrace;
__ptrace_link(current, parent);
......
......@@ -1184,7 +1184,7 @@ extern void wait_task_inactive(task_t * p);
#endif
#define remove_parent(p) list_del_init(&(p)->sibling)
#define add_parent(p, parent) list_add_tail(&(p)->sibling,&(parent)->children)
#define add_parent(p) list_add_tail(&(p)->sibling,&(p)->parent->children)
#define REMOVE_LINKS(p) do { \
if (thread_group_leader(p)) \
......@@ -1195,7 +1195,7 @@ extern void wait_task_inactive(task_t * p);
#define SET_LINKS(p) do { \
if (thread_group_leader(p)) \
list_add_tail(&(p)->tasks,&init_task.tasks); \
add_parent(p, (p)->parent); \
add_parent(p); \
} while (0)
#define next_task(p) list_entry((p)->tasks.next, struct task_struct, tasks)
......
......@@ -1281,7 +1281,7 @@ static int wait_task_stopped(task_t *p, int delayed_group_leader, int noreap,
/* move to end of parent's list to avoid starvation */
remove_parent(p);
add_parent(p, p->parent);
add_parent(p);
write_unlock_irq(&tasklist_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment