diff options
-rw-r--r-- | block/ll_rw_blk.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 57992ae511c2..f757ed413214 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c | |||
@@ -3629,25 +3629,22 @@ EXPORT_SYMBOL(put_io_context); | |||
3629 | /* Called by the exitting task */ | 3629 | /* Called by the exitting task */ |
3630 | void exit_io_context(void) | 3630 | void exit_io_context(void) |
3631 | { | 3631 | { |
3632 | unsigned long flags; | ||
3633 | struct io_context *ioc; | 3632 | struct io_context *ioc; |
3634 | struct cfq_io_context *cic; | 3633 | struct cfq_io_context *cic; |
3635 | 3634 | ||
3636 | local_irq_save(flags); | ||
3637 | task_lock(current); | 3635 | task_lock(current); |
3638 | ioc = current->io_context; | 3636 | ioc = current->io_context; |
3639 | current->io_context = NULL; | 3637 | current->io_context = NULL; |
3640 | ioc->task = NULL; | ||
3641 | task_unlock(current); | 3638 | task_unlock(current); |
3642 | local_irq_restore(flags); | ||
3643 | 3639 | ||
3640 | ioc->task = NULL; | ||
3644 | if (ioc->aic && ioc->aic->exit) | 3641 | if (ioc->aic && ioc->aic->exit) |
3645 | ioc->aic->exit(ioc->aic); | 3642 | ioc->aic->exit(ioc->aic); |
3646 | if (ioc->cic_root.rb_node != NULL) { | 3643 | if (ioc->cic_root.rb_node != NULL) { |
3647 | cic = rb_entry(rb_first(&ioc->cic_root), struct cfq_io_context, rb_node); | 3644 | cic = rb_entry(rb_first(&ioc->cic_root), struct cfq_io_context, rb_node); |
3648 | cic->exit(ioc); | 3645 | cic->exit(ioc); |
3649 | } | 3646 | } |
3650 | 3647 | ||
3651 | put_io_context(ioc); | 3648 | put_io_context(ioc); |
3652 | } | 3649 | } |
3653 | 3650 | ||