From: Jun'ichi Nomura Date: Fri, 24 Feb 2006 21:04:24 +0000 (-0800) Subject: [PATCH] dm: missing bdput/thaw_bdev at removal X-Git-Tag: MMI-PSA29.97-13-9~51864 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d9dde59ba03095e526640988c0fedd75e93bc8b7;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [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 Acked-by: Alasdair G Kergon Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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) static void free_dev(struct mapped_device *md) { + if (md->suspended_bdev) { + thaw_bdev(md->suspended_bdev, NULL); + bdput(md->suspended_bdev); + } free_minor(md->disk->first_minor); mempool_destroy(md->tio_pool); mempool_destroy(md->io_pool);