dm thin metadata: unlock superblock in init_pmd error path

If dm_sm_disk_create() fails the superblock must be unlocked.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
This commit is contained in:
Joe Thornber 2012-03-07 19:09:43 +00:00 committed by Alasdair G Kergon
parent 1f3db25d8b
commit 4469a5f387
1 changed files with 1 additions and 0 deletions

View File

@ -385,6 +385,7 @@ static int init_pmd(struct dm_pool_metadata *pmd,
data_sm = dm_sm_disk_create(tm, nr_blocks);
if (IS_ERR(data_sm)) {
DMERR("sm_disk_create failed");
dm_tm_unlock(tm, sblock);
r = PTR_ERR(data_sm);
goto bad;
}