
From: Kevin Corry <kevcorry@us.ibm.com>

In __map_bio(), if the target returns an error while mapping the I/O, the
cloned bio needs to be freed.

Signed-off-by:  Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/md/dm.c |    1 +
 1 files changed, 1 insertion(+)

diff -puN drivers/md/dm.c~dmc-free-cloned-bio-on-error-path drivers/md/dm.c
--- 25/drivers/md/dm.c~dmc-free-cloned-bio-on-error-path	Wed May 26 15:42:33 2004
+++ 25-akpm/drivers/md/dm.c	Wed May 26 15:42:33 2004
@@ -369,6 +369,7 @@ static void __map_bio(struct dm_target *
 		struct dm_io *io = tio->io;
 		free_tio(tio->io->md, tio);
 		dec_pending(io, -EIO);
+		bio_put(clone);
 	}
 }
 
_
