aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-02-27 11:49:05 -0500
committerJeff Garzik <jeff@garzik.org>2006-02-27 11:49:05 -0500
commitcccc65a3b60edaf721cdee5a14f68ba009341822 (patch)
treea458d28f70cbe0e848596aad6005442a2621d388 /drivers/md/dm.c
parentba70d0614728892b86b2be2f7eae0c696b436461 (diff)
parente95a9ec1bb66e07b138861c743192f06e7b3e4de (diff)
Merge branch 'master'
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index e9adeb9d172..745ca1f67b1 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -849,10 +849,16 @@ static struct mapped_device *alloc_dev(unsigned int minor, int persistent)
static void free_dev(struct mapped_device *md)
{
- free_minor(md->disk->first_minor);
+ unsigned int minor = md->disk->first_minor;
+
+ if (md->suspended_bdev) {
+ thaw_bdev(md->suspended_bdev, NULL);
+ bdput(md->suspended_bdev);
+ }
mempool_destroy(md->tio_pool);
mempool_destroy(md->io_pool);
del_gendisk(md->disk);
+ free_minor(minor);
put_disk(md->disk);
blk_put_queue(md->queue);
kfree(md);