From: Jens Axboe Date: Mon, 31 Oct 2005 12:51:33 +0000 (+0100) Subject: [PATCH] Fix on-the-fly switch from cfq i/o scheduler X-Git-Tag: v2.6.15-rc1~59^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fc207419d95e0e16fdc78e2f48f7c0b3640ffe5;p=linux-2.6 [PATCH] Fix on-the-fly switch from cfq i/o scheduler 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 Signed-off-by: Linus Torvalds --- diff --git a/drivers/block/cfq-iosched.c b/drivers/block/cfq-iosched.c index 5281f8e705..ecacca9c87 100644 --- a/drivers/block/cfq-iosched.c +++ b/drivers/block/cfq-iosched.c @@ -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);