Commit 2687a132 authored by Jun'ichi Nomura's avatar Jun'ichi Nomura Committed by Chris Wright

[PATCH] dm: missing bdput/thaw_bdev at removal

Need to unfreeze and release bdev otherwise the bdev inode with
inconsistent state is reused later and cause problem.
Signed-off-by: default avatarJun'ichi Nomura <j-nomura@ce.jp.nec.com>
Acked-by: default avatarAlasdair G Kergon <agk@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
[chrisw: backport to 2.6.15]
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
parent 96fb1a89
......@@ -812,6 +812,10 @@ static struct mapped_device *alloc_dev(unsigned int minor, int persistent)
static void free_dev(struct mapped_device *md)
{
if (md->frozen_bdev) {
thaw_bdev(md->frozen_bdev, NULL);
bdput(md->frozen_bdev);
}
free_minor(md->disk->first_minor);
mempool_destroy(md->tio_pool);
mempool_destroy(md->io_pool);
......
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