From: Hannes Reinecke <[email-masked]>

As a precaution, set bi_end_io to NULL when failing to remap.

Signed-off-by: Hannes Reinecke <[email-masked]>
Signed-off-by: Alasdair G Kergon <[email-masked]>

---
drivers/md/dm.c |    1 +
 drivers/md/dm.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-3.3/drivers/md/dm.c
===================================================================
--- linux-3.3.orig/drivers/md/dm.c
+++ linux-3.3/drivers/md/dm.c
@@ -1016,6 +1016,7 @@ static void __map_bio(struct dm_target *
 		/*
 		 * Store bio_set for cleanup.
 		 */
+		clone->bi_end_io = NULL;
 		clone->bi_private = md->bs;
 		bio_put(clone);
 		free_tio(md, tio);