dm thin metadata: remove duplicate pmd initialisation
authorJoe Thornber <ejt@redhat.com>
Fri, 27 Jul 2012 14:08:13 +0000 (15:08 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Fri, 27 Jul 2012 14:08:13 +0000 (15:08 +0100)
Remove some duplicate initialisation of struct dm_pool_metadata.

These pmd fields are initialised by both:
  __format_metadata's calls to dm_btree_empty
  __write_initial_superblock + __begin_transaction

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-thin-metadata.c

index 7317f1b..51b97f0 100644 (file)
@@ -512,11 +512,6 @@ static int __format_metadata(struct dm_pool_metadata *pmd)
 
        __setup_btree_details(pmd);
 
-       pmd->root = 0;
-       pmd->details_root = 0;
-       pmd->trans_id = 0;
-       pmd->flags = 0;
-
        r = dm_btree_empty(&pmd->info, &pmd->root);
        if (r < 0)
                goto bad_data_sm;