]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] dm.c: free cloned bio on error path
authorAndrew Morton <akpm@osdl.org>
Sat, 29 May 2004 03:57:09 +0000 (20:57 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 29 May 2004 03:57:09 +0000 (20:57 -0700)
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>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/dm.c

index bdfcbe09d4d5cf96a3450a66c6df6b1b45d71ee8..a347d88d426af4db02168543244fed960a686417 100644 (file)
@@ -369,6 +369,7 @@ static void __map_bio(struct dm_target *ti, struct bio *clone,
                struct dm_io *io = tio->io;
                free_tio(tio->io->md, tio);
                dec_pending(io, -EIO);
+               bio_put(clone);
        }
 }