Commit 4469a5f3 authored by Joe Thornber's avatar Joe Thornber Committed by Alasdair G Kergon

dm thin metadata: unlock superblock in init_pmd error path

If dm_sm_disk_create() fails the superblock must be unlocked.
Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
Acked-by: default avatarMike Snitzer <snitzer@redhat.com>
Cc: stable@kernel.org
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
parent 1f3db25d
...@@ -385,6 +385,7 @@ static int init_pmd(struct dm_pool_metadata *pmd, ...@@ -385,6 +385,7 @@ static int init_pmd(struct dm_pool_metadata *pmd,
data_sm = dm_sm_disk_create(tm, nr_blocks); data_sm = dm_sm_disk_create(tm, nr_blocks);
if (IS_ERR(data_sm)) { if (IS_ERR(data_sm)) {
DMERR("sm_disk_create failed"); DMERR("sm_disk_create failed");
dm_tm_unlock(tm, sblock);
r = PTR_ERR(data_sm); r = PTR_ERR(data_sm);
goto bad; goto bad;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment