]> sourceware.org Git - lvm2.git/commitdiff
cache: set areas count prior using it
authorZdenek Kabelac <zkabelac@redhat.com>
Sat, 23 Jun 2018 09:35:34 +0000 (11:35 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 25 Jun 2018 13:07:32 +0000 (15:07 +0200)
Set correct counter, so it's not failing on internal error check.

lib/metadata/cache_manip.c

index c3bd2ec6f93438c4561e3d09bf56f5292357a881..e34714473696165a1001a79c7c525714f40004e0 100644 (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;
This page took 0.038502 seconds and 5 git commands to generate.