[PATCH] 2/5: dm.c: free cloned bio on error path

From: Kevin Corry
Date: Wed May 26 2004 - 12:00:43 EST


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

--- diff/drivers/md/dm.c 2004-05-09 21:33:10.000000000 -0500
+++ source/drivers/md/dm.c 2004-05-25 10:13:41.000000000 -0500
@@ -369,6 +369,7 @@
struct dm_io *io = tio->io;
free_tio(tio->io->md, tio);
dec_pending(io, -EIO);
+ bio_put(clone);
}
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/