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

[dm-devel] [PATCH] dm.c: free cloned bio in __map_bio error path.



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

--- diff/drivers/md/dm.c	2004-05-04 10:29:22.000000000 -0500
+++ source/drivers/md/dm.c	2004-05-04 10:29:02.000000000 -0500
@@ -370,6 +370,7 @@
 		struct dm_io *io = tio->io;
 		free_tio(tio->io->md, tio);
 		dec_pending(io, -EIO);
+		bio_put(clone);
 	}
 }
 

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