Skip to contentSkip to conversation

cfq_exit_queue() should cancel cfq_data->unplug_work

PATCH In review Oleg Nesterov 1 participant 1 message Oct 20, 2007 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 cfq_exit_queue() should cancel cfq_data->unplug_work

(untested, needs an explicit ack/nack from maintainer)

Spotted by Nick <[email protected]>, perhaps explains the first trace in
http://bugzilla.kernel.org/show_bug.cgi?id=9180.

cfq_exit_queue() should cancel cfqd->unplug_work before freeing cfqd. blk_sync_queue() seems unneeded, removed.

Q: why cfq_exit_queue() calls cfq_shutdown_timer_wq() twice?

block/cfq-iosched.c renamed from block/cfq-iosched.c~1_cfq +1 -1
@@ -2053,7 +2053,7 @@ static void cfq_shutdown_timer_wq(struct
 {
 	del_timer_sync(&cfqd->idle_slice_timer);
 	del_timer_sync(&cfqd->idle_class_timer);
-	blk_sync_queue(cfqd->queue);
+	kblockd_flush_work(&cfqd->unplug_work);
 }
 
 static void cfq_put_async_queues(struct cfq_data *cfqd)