summaryrefslogtreecommitdiff
path: root/drivers/md/persistent-data
diff options
context:
space:
mode:
authorBenjamin Marzinski <bmarzins@redhat.com>2016-12-03 00:14:17 +0300
committerMike Snitzer <snitzer@redhat.com>2016-12-08 22:13:15 +0300
commit0c79ce0b75304fbbe42282a7d40af4367e31efc6 (patch)
tree9d8bc987b6edc5dd2e766d106451ddd842c3454c /drivers/md/persistent-data
parent314c25c56c1ee5026cf99c570bdfe01847927acb (diff)
downloadlinux-0c79ce0b75304fbbe42282a7d40af4367e31efc6.tar.xz
dm space map metadata: skip useless memcpy in metadata_ll_init_index()
When metadata_ll_init_index() is called by sm_ll_new_metadata(), ll->mi_le hasn't been initialized yet. So, when metadata_ll_init_index() copies the contents of ll->mi_le into the newly allocated bitmap_root, it is just copying garbage. ll->mi_le will be allocated later in sm_ll_extend() and copied into the bitmap_root, in sm_ll_commit(). Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/persistent-data')
-rw-r--r--drivers/md/persistent-data/dm-space-map-common.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/md/persistent-data/dm-space-map-common.c b/drivers/md/persistent-data/dm-space-map-common.c
index 306d2e4502c4..10978ba1d2c1 100644
--- a/drivers/md/persistent-data/dm-space-map-common.c
+++ b/drivers/md/persistent-data/dm-space-map-common.c
@@ -547,7 +547,6 @@ static int metadata_ll_init_index(struct ll_disk *ll)
if (r < 0)
return r;
- memcpy(dm_block_data(b), &ll->mi_le, sizeof(ll->mi_le));
ll->bitmap_root = dm_block_location(b);
dm_tm_unlock(ll->tm, b);