Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
		}