Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ccdbf85 authored by Mike Snitzer's avatar Mike Snitzer
Browse files

dm thin metadata: remove needless work from __commit_transaction



Commit 5a32083d ("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: 5a32083d ("dm: take care to copy the space map roots before locking the superblock")
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent f21c601a
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -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;

@@ -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;