diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2009-04-02 14:55:36 -0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2009-04-02 14:55:36 -0400 |
commit | 9a1fb46448cac50e93115322ad28f417936f7852 (patch) | |
tree | 120e3e431dd98044a7620e4095da4bcc37ae4407 /drivers/md/dm.c | |
parent | 143773965b4677bd72dbbf71f52bea0df2ed4e18 (diff) |
dm: remove unnecessary work queue context field
Remove the context field from struct dm_wq_req because we will no longer
need it.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 13 |
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) | |||
102 | struct dm_wq_req { | 102 | struct 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 | ||
108 | struct mapped_device { | 107 | struct 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 | ||
1438 | static void dm_wq_queue(struct mapped_device *md, void *context, | 1437 | static 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 | ||
1447 | static void dm_queue_flush(struct mapped_device *md, void *context) | 1444 | static 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 | ||