1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

cache: set areas count prior using it

Set correct counter, so it's not failing on internal error check.
This commit is contained in:
Zdenek Kabelac 2018-06-23 11:35:34 +02:00
parent 6b3a4aac09
commit 8949903fbb

View File

@ -623,10 +623,10 @@ int lv_cache_remove(struct logical_volume *cache_lv)
if (!(cache_seg->areas = dm_pool_zalloc(cache_lv->vg->vgmem, sizeof(*cache_seg->areas))))
return_0;
cache_seg->area_count = 1;
if (!set_lv_segment_area_lv(cache_seg, 0, cache_lv, 0, 0))
return_0;
cache_seg->area_count = 1;
corigin_lv->le_count = cache_lv->le_count;
corigin_lv->size = cache_lv->size;
corigin_lv->status |= LV_PENDING_DELETE;