From: Joe Thornber <[email-masked]>

dm thin metadata: remove 'create' parameter from __create_persistent_data_objects()

Cody tidy.

No need for 'create' variable within dm_pool_metadata_open.

Signed-off-by: Joe Thornber <[email-masked]>
Signed-off-by: Mike Snitzer <[email-masked]>
---
 drivers/md/dm-thin-metadata.c |   17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

Index: linux/drivers/md/dm-thin-metadata.c
===================================================================
--- linux.orig/drivers/md/dm-thin-metadata.c
+++ linux/drivers/md/dm-thin-metadata.c
@@ -595,23 +595,21 @@ bad:
 	return r;
 }
 
-static int __open_or_format_metadata(struct dm_pool_metadata *pmd,
-				     int *create)
+static int __open_or_format_metadata(struct dm_pool_metadata *pmd)
 {
-	int r;
+	int r, unformatted;
 
-	r = __superblock_all_zeroes(pmd->bm, create);
+	r = __superblock_all_zeroes(pmd->bm, &unformatted);
 	if (r)
 		return r;
 
-	if (*create)
+	if (unformatted)
 		return __format_metadata(pmd);
 	else
 		return __open_metadata(pmd);
 }
 
-static int __create_persistent_data_objects(struct dm_pool_metadata *pmd,
-					    int *create)
+static int __create_persistent_data_objects(struct dm_pool_metadata *pmd)
 {
 	int r;
 
@@ -623,7 +621,7 @@ static int __create_persistent_data_obje
 		return PTR_ERR(pmd->bm);
 	}
 
-	r = __open_or_format_metadata(pmd, create);
+	r = __open_or_format_metadata(pmd);
 	if (r)
 		dm_block_manager_destroy(pmd->bm);
 
@@ -794,7 +792,6 @@ struct dm_pool_metadata *dm_pool_metadat
 {
 	int r;
 	struct dm_pool_metadata *pmd;
-	int create;
 
 	pmd = kmalloc(sizeof(*pmd), GFP_KERNEL);
 	if (!pmd) {
@@ -808,7 +805,7 @@ struct dm_pool_metadata *dm_pool_metadat
 	pmd->bdev = bdev;
 	pmd->data_block_size = data_block_size;
 
-	r = __create_persistent_data_objects(pmd, &create);
+	r = __create_persistent_data_objects(pmd);
 	if (r) {
 		kfree(pmd);
 		return ERR_PTR(r);