summaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-20 10:28:51 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-20 10:28:51 -0800
commita90779bfc83b7489270a8ce2c3fc9df20dac2b24 (patch)
tree53a41d0e419024619c621facb2baf6e782e16f35 /kernel/exit.c
parent7705a8792b0fc82fd7d4dd923724606bbfd9fb20 (diff)
parente572ec7e4e432de7ecf7bd2e62117646fa64e518 (diff)
downloadlinux-a90779bfc83b7489270a8ce2c3fc9df20dac2b24.tar.bz2
Merge branch 'block-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/block
* 'block-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/block: [PATCH] fix rmmod problems with elevator attributes, clean them up [PATCH] elevator_t lifetime rules and sysfs fixes [PATCH] noise removal: cfq-iosched.c [PATCH] don't bother with refcounting for cfq_data [PATCH] fix sysfs interaction and lifetime rules handling for queues [PATCH] regularize blk_cleanup_queue() use [PATCH] fix cfq_get_queue()/ioprio_set(2) races [PATCH] deal with rmmod/put_io_context() races [PATCH] stop elv_unregister() from rogering other iosched's data, fix locking [PATCH] stop cfq from pinning queue down [PATCH] make cfq_exit_queue() prune the cfq_io_context for that queue [PATCH] fix the exclusion for ioprio_set() [PATCH] keep sync and async cfq_queue separate [PATCH] switch to use of ->key to get cfq_data by cfq_io_context [PATCH] stop leaking cfq_data in cfq_set_request() [PATCH] fix cfq hash lookups [PATCH] fix locking in queue_requests_store() [PATCH] fix double-free in blk_init_queue_node() [PATCH] don't do exit_io_context() until we know we won't be doing any IO
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 531aadca5530..d1e8d500a7e1 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -807,8 +807,6 @@ fastcall NORET_TYPE void do_exit(long code)
panic("Attempted to kill the idle task!");
if (unlikely(tsk->pid == 1))
panic("Attempted to kill init!");
- if (tsk->io_context)
- exit_io_context();
if (unlikely(current->ptrace & PT_TRACE_EXIT)) {
current->ptrace_message = code;
@@ -822,6 +820,8 @@ fastcall NORET_TYPE void do_exit(long code)
if (unlikely(tsk->flags & PF_EXITING)) {
printk(KERN_ALERT
"Fixing recursive fault but reboot is needed!\n");
+ if (tsk->io_context)
+ exit_io_context();
set_current_state(TASK_UNINTERRUPTIBLE);
schedule();
}
@@ -881,6 +881,9 @@ fastcall NORET_TYPE void do_exit(long code)
*/
mutex_debug_check_no_locks_held(tsk);
+ if (tsk->io_context)
+ exit_io_context();
+
/* PF_DEAD causes final put_task_struct after we schedule. */
preempt_disable();
BUG_ON(tsk->flags & PF_DEAD);