diff options
Diffstat (limited to 'drivers/block/cfq-iosched.c')
-rw-r--r-- | drivers/block/cfq-iosched.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/block/cfq-iosched.c b/drivers/block/cfq-iosched.c index 94690e4d41e0..5281f8e70510 100644 --- a/drivers/block/cfq-iosched.c +++ b/drivers/block/cfq-iosched.c | |||
@@ -2418,28 +2418,8 @@ static int __init cfq_init(void) | |||
2418 | 2418 | ||
2419 | static void __exit cfq_exit(void) | 2419 | static void __exit cfq_exit(void) |
2420 | { | 2420 | { |
2421 | struct task_struct *g, *p; | ||
2422 | unsigned long flags; | ||
2423 | |||
2424 | read_lock_irqsave(&tasklist_lock, flags); | ||
2425 | |||
2426 | /* | ||
2427 | * iterate each process in the system, removing our io_context | ||
2428 | */ | ||
2429 | do_each_thread(g, p) { | ||
2430 | struct io_context *ioc = p->io_context; | ||
2431 | |||
2432 | if (ioc && ioc->cic) { | ||
2433 | ioc->cic->exit(ioc->cic); | ||
2434 | cfq_free_io_context(ioc->cic); | ||
2435 | ioc->cic = NULL; | ||
2436 | } | ||
2437 | } while_each_thread(g, p); | ||
2438 | |||
2439 | read_unlock_irqrestore(&tasklist_lock, flags); | ||
2440 | |||
2441 | cfq_slab_kill(); | ||
2442 | elv_unregister(&iosched_cfq); | 2421 | elv_unregister(&iosched_cfq); |
2422 | cfq_slab_kill(); | ||
2443 | } | 2423 | } |
2444 | 2424 | ||
2445 | module_init(cfq_init); | 2425 | module_init(cfq_init); |