mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
be226be635
If _move_lv_segments is passed a 'lv_from' that does not yet have any segments, it will screw things up because the code that does the segment copy assumes there is at least one segment. See copy code here: lv_to->segments = lv_from->segments; lv_to->segments.n->p = &lv_to->segments; lv_to->segments.p->n = &lv_to->segments; If 'segments' is an empty list, the first statement copies over the values, but the next two reset those values to point to the other LV's list structure. 'lv_to' now appears to have one segment, but it is really an ill-set pointer.