Skip to content

Commit

Permalink
dm thin metadata: remove needless work from __commit_transaction
Browse files Browse the repository at this point in the history
Commit 5a32083 ("dm: take care to copy the space map roots before
locking the superblock") properly removed the calls to dm_sm_root_size()
from __write_initial_superblock().  But the dm_sm_root_size() calls were
left dangling in __commit_transaction().

Fixes: 5a32083 ("dm: take care to copy the space map roots before locking the superblock")
Signed-off-by: Mike Snitzer <[email protected]>
  • Loading branch information
snitm committed Jun 22, 2018
1 parent f21c601 commit 7ccdbf8
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions drivers/md/dm-thin-metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,6 @@ static int __write_changed_details(struct dm_pool_metadata *pmd)
static int __commit_transaction(struct dm_pool_metadata *pmd)
{
int r;
size_t metadata_len, data_len;
struct thin_disk_superblock *disk_super;
struct dm_block *sblock;

Expand All @@ -797,14 +796,6 @@ static int __commit_transaction(struct dm_pool_metadata *pmd)
if (r < 0)
return r;

r = dm_sm_root_size(pmd->metadata_sm, &metadata_len);
if (r < 0)
return r;

r = dm_sm_root_size(pmd->data_sm, &data_len);
if (r < 0)
return r;

r = save_sm_roots(pmd);
if (r < 0)
return r;
Expand Down

0 comments on commit 7ccdbf8

Please sign in to comment.