Commit 0f76498d authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

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

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: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c1d91a0d
......@@ -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);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment