diff options
-rw-r--r-- | arch/mips/kernel/irixsig.c | 4 | ||||
-rw-r--r-- | fs/exec.c | 4 | ||||
-rw-r--r-- | include/linux/sched.h | 4 | ||||
-rw-r--r-- | kernel/exit.c | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c index 08273a2a501d..8150f071f80a 100644 --- a/arch/mips/kernel/irixsig.c +++ b/arch/mips/kernel/irixsig.c | |||
@@ -603,7 +603,7 @@ repeat: | |||
603 | /* move to end of parent's list to avoid starvation */ | 603 | /* move to end of parent's list to avoid starvation */ |
604 | write_lock_irq(&tasklist_lock); | 604 | write_lock_irq(&tasklist_lock); |
605 | remove_parent(p); | 605 | remove_parent(p); |
606 | add_parent(p, p->parent); | 606 | add_parent(p); |
607 | write_unlock_irq(&tasklist_lock); | 607 | write_unlock_irq(&tasklist_lock); |
608 | retval = ru ? getrusage(p, RUSAGE_BOTH, ru) : 0; | 608 | retval = ru ? getrusage(p, RUSAGE_BOTH, ru) : 0; |
609 | if (retval) | 609 | if (retval) |
@@ -643,7 +643,7 @@ repeat: | |||
643 | write_lock_irq(&tasklist_lock); | 643 | write_lock_irq(&tasklist_lock); |
644 | remove_parent(p); | 644 | remove_parent(p); |
645 | p->parent = p->real_parent; | 645 | p->parent = p->real_parent; |
646 | add_parent(p, p->parent); | 646 | add_parent(p); |
647 | do_notify_parent(p, SIGCHLD); | 647 | do_notify_parent(p, SIGCHLD); |
648 | write_unlock_irq(&tasklist_lock); | 648 | write_unlock_irq(&tasklist_lock); |
649 | } else | 649 | } else |
@@ -725,8 +725,8 @@ static int de_thread(struct task_struct *tsk) | |||
725 | current->group_leader = current; | 725 | current->group_leader = current; |
726 | leader->group_leader = leader; | 726 | leader->group_leader = leader; |
727 | 727 | ||
728 | add_parent(current, current->parent); | 728 | add_parent(current); |
729 | add_parent(leader, leader->parent); | 729 | add_parent(leader); |
730 | if (ptrace) { | 730 | if (ptrace) { |
731 | current->ptrace = ptrace; | 731 | current->ptrace = ptrace; |
732 | __ptrace_link(current, parent); | 732 | __ptrace_link(current, parent); |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5f5ab98bbb6b..b4b14c32b28a 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1184,7 +1184,7 @@ extern void wait_task_inactive(task_t * p); | |||
1184 | #endif | 1184 | #endif |
1185 | 1185 | ||
1186 | #define remove_parent(p) list_del_init(&(p)->sibling) | 1186 | #define remove_parent(p) list_del_init(&(p)->sibling) |
1187 | #define add_parent(p, parent) list_add_tail(&(p)->sibling,&(parent)->children) | 1187 | #define add_parent(p) list_add_tail(&(p)->sibling,&(p)->parent->children) |
1188 | 1188 | ||
1189 | #define REMOVE_LINKS(p) do { \ | 1189 | #define REMOVE_LINKS(p) do { \ |
1190 | if (thread_group_leader(p)) \ | 1190 | if (thread_group_leader(p)) \ |
@@ -1195,7 +1195,7 @@ extern void wait_task_inactive(task_t * p); | |||
1195 | #define SET_LINKS(p) do { \ | 1195 | #define SET_LINKS(p) do { \ |
1196 | if (thread_group_leader(p)) \ | 1196 | if (thread_group_leader(p)) \ |
1197 | list_add_tail(&(p)->tasks,&init_task.tasks); \ | 1197 | list_add_tail(&(p)->tasks,&init_task.tasks); \ |
1198 | add_parent(p, (p)->parent); \ | 1198 | add_parent(p); \ |
1199 | } while (0) | 1199 | } while (0) |
1200 | 1200 | ||
1201 | #define next_task(p) list_entry((p)->tasks.next, struct task_struct, tasks) | 1201 | #define next_task(p) list_entry((p)->tasks.next, struct task_struct, tasks) |
diff --git a/kernel/exit.c b/kernel/exit.c index e04a59405e99..df26c33037d2 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -1281,7 +1281,7 @@ bail_ref: | |||
1281 | 1281 | ||
1282 | /* move to end of parent's list to avoid starvation */ | 1282 | /* move to end of parent's list to avoid starvation */ |
1283 | remove_parent(p); | 1283 | remove_parent(p); |
1284 | add_parent(p, p->parent); | 1284 | add_parent(p); |
1285 | 1285 | ||
1286 | write_unlock_irq(&tasklist_lock); | 1286 | write_unlock_irq(&tasklist_lock); |
1287 | 1287 | ||