dm: remove unnecessary work queue context field

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, April 3, 2009 - 11:09 am

Gitweb:     http://git.kernel.org/linus/9a1fb46448cac50e93115322ad28f417936f7852
Commit:     9a1fb46448cac50e93115322ad28f417936f7852
Parent:     143773965b4677bd72dbbf71f52bea0df2ed4e18
Author:     Mikulas Patocka <mpatocka@redhat.com>
AuthorDate: Thu Apr 2 19:55:36 2009 +0100
Committer:  Alasdair G Kergon <agk@redhat.com>
CommitDate: Thu Apr 2 19:55:36 2009 +0100

    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>
---
 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 bbc7ecf..f913b50 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -102,7 +102,6 @@ union map_info *dm_get_mapinfo(struct bio *bio)
 struct dm_wq_req {
 	struct work_struct work;
 	struct mapped_device *md;
-	void *context;
 };
 
 struct mapped_device {
@@ -1435,20 +1434,18 @@ static void dm_wq_work(struct work_struct *work)
 	up_write(&md->io_lock);
 }
 
-static void dm_wq_queue(struct mapped_device *md, void *context,
-			struct dm_wq_req *req)
+static void dm_wq_queue(struct mapped_device *md, struct dm_wq_req *req)
 {
 	req->md = md;
-	req->context = context;
 	INIT_WORK(&req->work, dm_wq_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;
 
-	dm_wq_queue(md, context, &req);
+	dm_wq_queue(md, &req);
 	flush_workqueue(md->wq);
 }
 
@@ -1594,7 +1591,7 @@ int dm_suspend(struct mapped_device *md, unsigned suspend_flags)
 
 	/* were we interrupted ? */
 	if (r < 0) {
-		dm_queue_flush(md, NULL);
+		dm_queue_flush(md);
 
 		unlock_fs(md);
 		goto out; /* pushback list is already flushed, so skip flush */
@@ -1634,7 +1631,7 @@ int dm_resume(struct mapped_device *md)
 	if (r)
 		goto out;
 
-	dm_queue_flush(md, NULL);
+	dm_queue_flush(md);
 
 	unlock_fs(md);
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
dm: remove unnecessary work queue context field, Linux Kernel Mailing ..., (Fri Apr 3, 11:09 am)