]> sourceware.org Git - lvm2.git/commitdiff
cache: use new api function
authorZdenek Kabelac <zkabelac@redhat.com>
Sat, 23 Jun 2018 09:47:33 +0000 (11:47 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 25 Jun 2018 13:07:55 +0000 (15:07 +0200)
lib/metadata/cache_manip.c

index e34714473696165a1001a79c7c525714f40004e0..4132e2faa41261db08691e1fa45345251d277615 100644 (file)
@@ -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;
 
This page took 0.049816 seconds and 5 git commands to generate.