diff options
author | Coywolf Qi Hunt <qiyong@fc-cn.com> | 2005-10-30 18:02:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 20:37:23 -0500 |
commit | 7407251a0e2ed099e4b12b742b635503e981507c (patch) | |
tree | 826c78104c96a3982ff8348484749c718f4a413a /kernel/exit.c | |
parent | 40dc565122ed1e180a0637f88cdfca734d33db78 (diff) |
[PATCH] PF_DEAD cleanup
The PF_DEAD setting doesn't belong to exit_notify(), move it to a proper
place.
Signed-off-by: Coywolf Qi Hunt <qiyong@fc-cn.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 79f52b85d6e..6ef8f7356a7 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -783,10 +783,6 @@ static void exit_notify(struct task_struct *tsk) | |||
783 | /* If the process is dead, release it - nobody will wait for it */ | 783 | /* If the process is dead, release it - nobody will wait for it */ |
784 | if (state == EXIT_DEAD) | 784 | if (state == EXIT_DEAD) |
785 | release_task(tsk); | 785 | release_task(tsk); |
786 | |||
787 | /* PF_DEAD causes final put_task_struct after we schedule. */ | ||
788 | preempt_disable(); | ||
789 | tsk->flags |= PF_DEAD; | ||
790 | } | 786 | } |
791 | 787 | ||
792 | fastcall NORET_TYPE void do_exit(long code) | 788 | fastcall NORET_TYPE void do_exit(long code) |
@@ -873,7 +869,11 @@ fastcall NORET_TYPE void do_exit(long code) | |||
873 | tsk->mempolicy = NULL; | 869 | tsk->mempolicy = NULL; |
874 | #endif | 870 | #endif |
875 | 871 | ||
876 | BUG_ON(!(current->flags & PF_DEAD)); | 872 | /* PF_DEAD causes final put_task_struct after we schedule. */ |
873 | preempt_disable(); | ||
874 | BUG_ON(tsk->flags & PF_DEAD); | ||
875 | tsk->flags |= PF_DEAD; | ||
876 | |||
877 | schedule(); | 877 | schedule(); |
878 | BUG(); | 878 | BUG(); |
879 | /* Avoid "noreturn function does return". */ | 879 | /* Avoid "noreturn function does return". */ |