From: Joe Thornber <[email-masked]>

dm thin metadata: remove nr_blocks arg from __create_persistent_data_objects

Code tidy.

nr_blocks was always passed as zero.

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

Index: linux/drivers/md/dm-thin-metadata.c
===================================================================
--- linux.orig/drivers/md/dm-thin-metadata.c
+++ linux/drivers/md/dm-thin-metadata.c
@@ -485,7 +485,7 @@ out_locked:
 	return r;
 }
 
-static int __format_metadata(struct dm_pool_metadata *pmd, dm_block_t nr_blocks)
+static int __format_metadata(struct dm_pool_metadata *pmd)
 {
 	int r;
 
@@ -496,7 +496,7 @@ static int __format_metadata(struct dm_p
 		return r;
 	}
 
-	pmd->data_sm = dm_sm_disk_create(pmd->tm, nr_blocks);
+	pmd->data_sm = dm_sm_disk_create(pmd->tm, 0);
 	if (IS_ERR(pmd->data_sm)) {
 		DMERR("sm_disk_create failed");
 		r = PTR_ERR(pmd->data_sm);
@@ -596,16 +596,16 @@ bad:
 }
 
 static int __open_or_format_metadata(struct dm_pool_metadata *pmd,
-				     dm_block_t nr_blocks, int create)
+				     int create)
 {
 	if (create)
-		return __format_metadata(pmd, nr_blocks);
+		return __format_metadata(pmd);
 	else
 		return __open_metadata(pmd);
 }
 
 static int __create_persistent_data_objects(struct dm_pool_metadata *pmd,
-					    dm_block_t nr_blocks, int *create)
+					    int *create)
 {
 	int r;
 
@@ -623,7 +623,7 @@ static int __create_persistent_data_obje
 		return r;
 	}
 
-	r = __open_or_format_metadata(pmd, nr_blocks, *create);
+	r = __open_or_format_metadata(pmd, *create);
 	if (r)
 		dm_block_manager_destroy(pmd->bm);
 
@@ -808,7 +808,7 @@ struct dm_pool_metadata *dm_pool_metadat
 	pmd->bdev = bdev;
 	pmd->data_block_size = data_block_size;
 
-	r = __create_persistent_data_objects(pmd, 0, &create);
+	r = __create_persistent_data_objects(pmd, &create);
 	if (r) {
 		kfree(pmd);
 		return ERR_PTR(r);