1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

cache: use new api function

This commit is contained in:
Zdenek Kabelac 2018-06-23 11:47:33 +02:00
parent 9c0d92d957
commit 357e9f9572

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