summaryrefslogtreecommitdiff
path: root/lib/metadata/cache_manip.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2018-06-23 11:47:33 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2018-06-25 15:07:55 +0200
commit357e9f9572361ec2ea89ca0bf165a30545fa747f (patch)
tree85777b9d7c5809fe550226b009c7457404a3d28e /lib/metadata/cache_manip.c
parent9c0d92d9575da63b38685c385917644d9ac9445d (diff)
downloadlvm2-357e9f9572361ec2ea89ca0bf165a30545fa747f.tar.gz
cache: use new api function
Diffstat (limited to 'lib/metadata/cache_manip.c')
-rw-r--r--lib/metadata/cache_manip.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/metadata/cache_manip.c b/lib/metadata/cache_manip.c
index e34714473..4132e2faa 100644
--- a/lib/metadata/cache_manip.c
+++ b/lib/metadata/cache_manip.c
@@ -620,10 +620,9 @@ int lv_cache_remove(struct logical_volume *cache_lv)
if (!(cache_seg->segtype = get_segtype_from_string(corigin_lv->vg->cmd, SEG_TYPE_NAME_CACHE)))
return_0;
- if (!(cache_seg->areas = dm_pool_zalloc(cache_lv->vg->vgmem, sizeof(*cache_seg->areas))))
+ if (!add_lv_segment_areas(cache_seg, 1))
return_0;
- cache_seg->area_count = 1;
if (!set_lv_segment_area_lv(cache_seg, 0, cache_lv, 0, 0))
return_0;