aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index bbc7ecf6cf04..f913b507fc81 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -102,7 +102,6 @@ union map_info *dm_get_mapinfo(struct bio *bio)
102struct dm_wq_req { 102struct dm_wq_req {
103 struct work_struct work; 103 struct work_struct work;
104 struct mapped_device *md; 104 struct mapped_device *md;
105 void *context;
106}; 105};
107 106
108struct mapped_device { 107struct mapped_device {
@@ -1435,20 +1434,18 @@ static void dm_wq_work(struct work_struct *work)
1435 up_write(&md->io_lock); 1434 up_write(&md->io_lock);
1436} 1435}
1437 1436
1438static void dm_wq_queue(struct mapped_device *md, void *context, 1437static void dm_wq_queue(struct mapped_device *md, struct dm_wq_req *req)
1439 struct dm_wq_req *req)
1440{ 1438{
1441 req->md = md; 1439 req->md = md;
1442 req->context = context;
1443 INIT_WORK(&req->work, dm_wq_work); 1440 INIT_WORK(&req->work, dm_wq_work);
1444 queue_work(md->wq, &req->work); 1441 queue_work(md->wq, &req->work);
1445} 1442}
1446 1443
1447static void dm_queue_flush(struct mapped_device *md, void *context) 1444static void dm_queue_flush(struct mapped_device *md)
1448{ 1445{
1449 struct dm_wq_req req; 1446 struct dm_wq_req req;
1450 1447
1451 dm_wq_queue(md, context, &req); 1448 dm_wq_queue(md, &req);
1452 flush_workqueue(md->wq); 1449 flush_workqueue(md->wq);
1453} 1450}
1454 1451
@@ -1594,7 +1591,7 @@ int dm_suspend(struct mapped_device *md, unsigned suspend_flags)
1594 1591
1595 /* were we interrupted ? */ 1592 /* were we interrupted ? */
1596 if (r < 0) { 1593 if (r < 0) {
1597 dm_queue_flush(md, NULL); 1594 dm_queue_flush(md);
1598 1595
1599 unlock_fs(md); 1596 unlock_fs(md);
1600 goto out; /* pushback list is already flushed, so skip flush */ 1597 goto out; /* pushback list is already flushed, so skip flush */
@@ -1634,7 +1631,7 @@ int dm_resume(struct mapped_device *md)
1634 if (r) 1631 if (r)
1635 goto out; 1632 goto out;
1636 1633
1637 dm_queue_flush(md, NULL); 1634 dm_queue_flush(md);
1638 1635
1639 unlock_fs(md); 1636 unlock_fs(md);
1640 1637