From: Joe Thornber <[email-masked]>

If dm_sm_disk_create() fails the superblock must be unlocked.

Signed-off-by: Joe Thornber <[email-masked]>
Acked-by: Mike Snitzer <[email-masked]>
Cc: [email-masked]
Signed-off-by: Alasdair G Kergon <[email-masked]>

---
 drivers/md/dm-thin-metadata.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-3.3-rc6/drivers/md/dm-thin-metadata.c
===================================================================
--- linux-3.3-rc6.orig/drivers/md/dm-thin-metadata.c
+++ linux-3.3-rc6/drivers/md/dm-thin-metadata.c
@@ -385,6 +385,7 @@ static int init_pmd(struct dm_pool_metad
 		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;
 		}