diff options
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index d487d9deb98e..930b9fc27953 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -399,6 +399,11 @@ struct clone_info { | |||
399 | unsigned short idx; | 399 | unsigned short idx; |
400 | }; | 400 | }; |
401 | 401 | ||
402 | static void dm_bio_destructor(struct bio *bio) | ||
403 | { | ||
404 | bio_free(bio, dm_set); | ||
405 | } | ||
406 | |||
402 | /* | 407 | /* |
403 | * Creates a little bio that is just does part of a bvec. | 408 | * Creates a little bio that is just does part of a bvec. |
404 | */ | 409 | */ |
@@ -410,6 +415,7 @@ static struct bio *split_bvec(struct bio *bio, sector_t sector, | |||
410 | struct bio_vec *bv = bio->bi_io_vec + idx; | 415 | struct bio_vec *bv = bio->bi_io_vec + idx; |
411 | 416 | ||
412 | clone = bio_alloc_bioset(GFP_NOIO, 1, dm_set); | 417 | clone = bio_alloc_bioset(GFP_NOIO, 1, dm_set); |
418 | clone->bi_destructor = dm_bio_destructor; | ||
413 | *clone->bi_io_vec = *bv; | 419 | *clone->bi_io_vec = *bv; |
414 | 420 | ||
415 | clone->bi_sector = sector; | 421 | clone->bi_sector = sector; |