Skip to content

Commit

Permalink
[PATCH] Fix on-the-fly switch from cfq i/o scheduler
Browse files Browse the repository at this point in the history
Don't clear ->elevator_data on exit, if we are switching queues we are
overwriting the data of the new io scheduler.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jens Axboe authored and Linus Torvalds committed Oct 31, 2005
1 parent dd05e42 commit 4fc2074
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -2059,10 +2059,8 @@ static void cfq_put_cfqd(struct cfq_data *cfqd)
if (!atomic_dec_and_test(&cfqd->ref))
return;

blk_put_queue(q);

cfq_shutdown_timer_wq(cfqd);
q->elevator->elevator_data = NULL;
blk_put_queue(q);

mempool_destroy(cfqd->crq_pool);
kfree(cfqd->crq_hash);
Expand Down

0 comments on commit 4fc2074

Please sign in to comment.