aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2012-03-07 19:09:43 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-12 12:31:41 -0700
commitb995290dfc5c32a6c7006002e54fed30e4b8f829 (patch)
tree63697ee6b17bde7d001ca148a672e8a5f80329e3
parent6cb44f13d19edb09a4d53cef4d17773d9bb03e39 (diff)
dm thin metadata: unlock superblock in init_pmd error path
commit 4469a5f387fdde956894137751a41473618a4a52 upstream. 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> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 13d964636d5..05b7ffc030e 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,
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;
}