[PATCH 1/7] dm: use dm_rq_target_io as argument for dm_done()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



No functional change.

Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
---
 drivers/md/dm.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 455e649..de88fac 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -964,17 +964,17 @@ static void start_queue(struct request_queue *q)
 	spin_unlock_irqrestore(q->queue_lock, flags);
 }
 
-static void dm_done(struct request *clone, int error, bool mapped)
+static void dm_done(struct request *clone, struct dm_rq_target_io *tio,
+		    bool mapped)
 {
-	int r = error;
-	struct dm_rq_target_io *tio = clone->end_io_data;
+	int r = tio->error;
 	dm_request_endio_fn rq_end_io = NULL;
 
 	if (tio->ti) {
 		rq_end_io = tio->ti->type->rq_end_io;
 
 		if (mapped && rq_end_io)
-			r = rq_end_io(tio->ti, clone, error, &tio->info);
+			r = rq_end_io(tio->ti, clone, tio->error, &tio->info);
 	}
 
 	if (r <= 0)
@@ -1004,7 +1004,7 @@ static void dm_softirq_done(struct request *rq)
 	if (rq->cmd_flags & REQ_FAILED)
 		mapped = false;
 
-	dm_done(clone, tio->error, mapped);
+	dm_done(clone, tio, mapped);
 }
 
 /*
-- 
1.7.12.4

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux