diff options
author | Jun'ichi Nomura <j-nomura@ce.jp.nec.com> | 2006-02-24 13:04:24 -0800 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2006-03-01 14:36:36 -0800 |
commit | 2687a132e9d6e5e9249fc2b961ab37cf185dd3c8 (patch) | |
tree | 2c1df056eae06a7d651895c719c6b9e6a3ca11db | |
parent | 96fb1a894d71297d8abe0a803a725f7eb25910c3 (diff) |
[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: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Acked-by: Alasdair G Kergon <agk@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
[chrisw: backport to 2.6.15]
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
-rw-r--r-- | drivers/md/dm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 930b9fc27953..e0b63d7f5704 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -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); |