summaryrefslogtreecommitdiffstats
path: root/drivers/md/persistent-data
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2019-03-22 21:12:22 +0100
committerMike Snitzer <snitzer@redhat.com>2019-04-18 22:18:32 +0200
commitc6e086e0c9b2133f38563707c96b22fd0906f570 (patch)
treece94d77245863f7f51dbec736b4fd62848b8b0a3 /drivers/md/persistent-data
parentdm writecache: add unlikely for returned value of rb_next/prev (diff)
downloadlinux-c6e086e0c9b2133f38563707c96b22fd0906f570.tar.xz
linux-c6e086e0c9b2133f38563707c96b22fd0906f570.zip
dm space map common: zero entire ll_disk
Otherwise, memory that is allocated (and potentially not previously zeroed) will get written to disk as part of the space maps. 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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/persistent-data/dm-space-map-common.c b/drivers/md/persistent-data/dm-space-map-common.c
index 0a3b8ae4a29c..b8a62188f6be 100644
--- a/drivers/md/persistent-data/dm-space-map-common.c
+++ b/drivers/md/persistent-data/dm-space-map-common.c
@@ -190,6 +190,8 @@ static int sm_find_free(void *addr, unsigned begin, unsigned end,
static int sm_ll_init(struct ll_disk *ll, struct dm_transaction_manager *tm)
{
+ memset(ll, 0, sizeof(struct ll_disk));
+
ll->tm = tm;
ll->bitmap_info.tm = tm;