]> git.karo-electronics.de Git - linux-beck.git/commitdiff
dm: dont use flush_scheduled_work
authorTejun Heo <tj@kernel.org>
Thu, 13 Jan 2011 19:59:56 +0000 (19:59 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Thu, 13 Jan 2011 19:59:56 +0000 (19:59 +0000)
flush_scheduled_work() is being deprecated.  Flush the used work
directly instead.  In all dm targets, the only work which uses
system_wq is ->trigger_event.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-mpath.c
drivers/md/dm-raid1.c

index 406091f9692b9d7094f493ec2d312aa48a6336f4..fcc59c3f756e3275e1de30c42110518948cdfac0 100644 (file)
@@ -920,7 +920,7 @@ static void flush_multipath_work(struct multipath *m)
        flush_workqueue(kmpath_handlerd);
        multipath_wait_for_pg_init_completion(m);
        flush_workqueue(kmultipathd);
-       flush_scheduled_work();
+       flush_work_sync(&m->trigger_event);
 }
 
 static void multipath_dtr(struct dm_target *ti)
index c87756eb7a2149e7b1773a7b22f35914d40eeee7..0d58b6f875cc2fddeb4895b971b047b22f7b170e 100644 (file)
@@ -1138,7 +1138,7 @@ static void mirror_dtr(struct dm_target *ti)
 
        del_timer_sync(&ms->timer);
        flush_workqueue(ms->kmirrord_wq);
-       flush_scheduled_work();
+       flush_work_sync(&ms->trigger_event);
        dm_kcopyd_client_destroy(ms->kcopyd_client);
        destroy_workqueue(ms->kmirrord_wq);
        free_context(ms, ti, ms->nr_mirrors);