提交 4469a5f3 编写于 作者: J Joe Thornber 提交者: 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: NJoe Thornber <ejt@redhat.com>
Acked-by: NMike Snitzer <snitzer@redhat.com>
Cc: stable@kernel.org
Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册