]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
block: use cancel_work_sync() instead of kblockd_flush_work()
authorCheng Renquan <crquan@gmail.com>
Wed, 3 Dec 2008 11:41:39 +0000 (12:41 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 29 Dec 2008 07:28:44 +0000 (08:28 +0100)
After many improvements on kblockd_flush_work, it is now identical to
cancel_work_sync, so a direct call to cancel_work_sync is suggested.

The only difference is that cancel_work_sync is a GPL symbol,
so no non-GPL modules anymore.

Signed-off-by: Cheng Renquan <crquan@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/as-iosched.c
block/blk-core.c
block/cfq-iosched.c
include/linux/blkdev.h

index 71f0abb219eee2556d41dcc9f1f1e01834b6d8aa..802b5d0d853673adf31d720af6cd51f172c8827e 100644 (file)
@@ -1344,7 +1344,7 @@ static void as_exit_queue(elevator_t *e)
        struct as_data *ad = e->elevator_data;
 
        del_timer_sync(&ad->antic_timer);
-       kblockd_flush_work(&ad->antic_work);
+       cancel_work_sync(&ad->antic_work);
 
        BUG_ON(!list_empty(&ad->fifo_list[REQ_SYNC]));
        BUG_ON(!list_empty(&ad->fifo_list[REQ_ASYNC]));
index 20e1724ccb4c5012404c8450f9d94aefe2ac3cd2..2fdcd0cff57f240a664f3b33aa23c8feaa05c8dd 100644 (file)
@@ -408,7 +408,7 @@ void blk_sync_queue(struct request_queue *q)
 {
        del_timer_sync(&q->unplug_timer);
        del_timer_sync(&q->timeout);
-       kblockd_flush_work(&q->unplug_work);
+       cancel_work_sync(&q->unplug_work);
 }
 EXPORT_SYMBOL(blk_sync_queue);
 
@@ -2147,12 +2147,6 @@ int kblockd_schedule_work(struct request_queue *q, struct work_struct *work)
 }
 EXPORT_SYMBOL(kblockd_schedule_work);
 
-void kblockd_flush_work(struct work_struct *work)
-{
-       cancel_work_sync(work);
-}
-EXPORT_SYMBOL(kblockd_flush_work);
-
 int __init blk_dev_init(void)
 {
        kblockd_workqueue = create_workqueue("kblockd");
index 6a062eebbd15301320e7491b5dd45d17f2204a3c..a2bfec7d6b3618b928de63ab96303df8079d665b 100644 (file)
@@ -2160,7 +2160,7 @@ out_cont:
 static void cfq_shutdown_timer_wq(struct cfq_data *cfqd)
 {
        del_timer_sync(&cfqd->idle_slice_timer);
-       kblockd_flush_work(&cfqd->unplug_work);
+       cancel_work_sync(&cfqd->unplug_work);
 }
 
 static void cfq_put_async_queues(struct cfq_data *cfqd)
index 482e9600f7a2538b7b23dd4d615af560a0a3f616..e9bb73ff1d64cf8c64755f9fa72b271b1337e0e1 100644 (file)
@@ -978,7 +978,6 @@ static inline void put_dev_sector(Sector p)
 
 struct work_struct;
 int kblockd_schedule_work(struct request_queue *q, struct work_struct *work);
-void kblockd_flush_work(struct work_struct *work);
 
 #define MODULE_ALIAS_BLOCKDEV(major,minor) \
        MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor))