Skip to content

Commit

Permalink
[PATCH] dm: missing bdput/thaw_bdev at removal
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Alasdair G Kergon <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
nomuranec authored and Linus Torvalds committed Feb 24, 2006
1 parent 8dde050 commit d9dde59
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d9dde59

Please sign in to comment.