提交 9a1fb464 编写于 作者: M Mikulas Patocka 提交者: Alasdair G Kergon

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: NMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
上级 14377396
...@@ -102,7 +102,6 @@ union map_info *dm_get_mapinfo(struct bio *bio) ...@@ -102,7 +102,6 @@ union map_info *dm_get_mapinfo(struct bio *bio)
struct dm_wq_req { struct dm_wq_req {
struct work_struct work; struct work_struct work;
struct mapped_device *md; struct mapped_device *md;
void *context;
}; };
struct mapped_device { struct mapped_device {
...@@ -1435,20 +1434,18 @@ static void dm_wq_work(struct work_struct *work) ...@@ -1435,20 +1434,18 @@ static void dm_wq_work(struct work_struct *work)
up_write(&md->io_lock); up_write(&md->io_lock);
} }
static void dm_wq_queue(struct mapped_device *md, void *context, static void dm_wq_queue(struct mapped_device *md, struct dm_wq_req *req)
struct dm_wq_req *req)
{ {
req->md = md; req->md = md;
req->context = context;
INIT_WORK(&req->work, dm_wq_work); INIT_WORK(&req->work, dm_wq_work);
queue_work(md->wq, &req->work); queue_work(md->wq, &req->work);
} }
static void dm_queue_flush(struct mapped_device *md, void *context) static void dm_queue_flush(struct mapped_device *md)
{ {
struct dm_wq_req req; struct dm_wq_req req;
dm_wq_queue(md, context, &req); dm_wq_queue(md, &req);
flush_workqueue(md->wq); flush_workqueue(md->wq);
} }
...@@ -1594,7 +1591,7 @@ int dm_suspend(struct mapped_device *md, unsigned suspend_flags) ...@@ -1594,7 +1591,7 @@ int dm_suspend(struct mapped_device *md, unsigned suspend_flags)
/* were we interrupted ? */ /* were we interrupted ? */
if (r < 0) { if (r < 0) {
dm_queue_flush(md, NULL); dm_queue_flush(md);
unlock_fs(md); unlock_fs(md);
goto out; /* pushback list is already flushed, so skip flush */ goto out; /* pushback list is already flushed, so skip flush */
...@@ -1634,7 +1631,7 @@ int dm_resume(struct mapped_device *md) ...@@ -1634,7 +1631,7 @@ int dm_resume(struct mapped_device *md)
if (r) if (r)
goto out; goto out;
dm_queue_flush(md, NULL); dm_queue_flush(md);
unlock_fs(md); unlock_fs(md);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册