aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2012-03-07 14:09:43 -0500
committerAlasdair G Kergon <agk@redhat.com>2012-03-07 14:09:43 -0500
commit4469a5f387fdde956894137751a41473618a4a52 (patch)
treef191a4eeabe0af42d8025b15286257f6a4bf9b1a /drivers/md
parent1f3db25d8be4ac50b897b39609802183ea68a514 (diff)
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>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-thin-metadata.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c
index 13d964636d57..05b7ffc030ed 100644
--- a/drivers/md/dm-thin-metadata.c
+++ b/drivers/md/dm-thin-metadata.c
@@ -385,6 +385,7 @@ static int init_pmd(struct dm_pool_metadata *pmd,
385 data_sm = dm_sm_disk_create(tm, nr_blocks); 385 data_sm = dm_sm_disk_create(tm, nr_blocks);
386 if (IS_ERR(data_sm)) { 386 if (IS_ERR(data_sm)) {
387 DMERR("sm_disk_create failed"); 387 DMERR("sm_disk_create failed");
388 dm_tm_unlock(tm, sblock);
388 r = PTR_ERR(data_sm); 389 r = PTR_ERR(data_sm);
389 goto bad; 390 goto bad;
390 } 391 }