aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJun'ichi Nomura <j-nomura@ce.jp.nec.com>2006-02-24 16:04:24 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-24 17:31:39 -0500
commitd9dde59ba03095e526640988c0fedd75e93bc8b7 (patch)
tree5a56884f1e380906ad41cc257891f93ff6cb2cb5
parent8dde0509e74ff6044cf1788c917a22facce9f68d (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> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/md/dm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index e9adeb9d172f..dad9e403d59d 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -849,6 +849,10 @@ static struct mapped_device *alloc_dev(unsigned int minor, int persistent)
849 849
850static void free_dev(struct mapped_device *md) 850static void free_dev(struct mapped_device *md)
851{ 851{
852 if (md->suspended_bdev) {
853 thaw_bdev(md->suspended_bdev, NULL);
854 bdput(md->suspended_bdev);
855 }
852 free_minor(md->disk->first_minor); 856 free_minor(md->disk->first_minor);
853 mempool_destroy(md->tio_pool); 857 mempool_destroy(md->tio_pool);
854 mempool_destroy(md->io_pool); 858 mempool_destroy(md->io_pool);