mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cov: ensure detached_log_lv exists before use
This commit is contained in:
parent
5a3375f958
commit
1363a5ffb2
@ -993,7 +993,11 @@ static int _remove_mirror_images(struct logical_volume *lv,
|
|||||||
|
|
||||||
/* Mirror with only 1 area is 'in sync'. */
|
/* Mirror with only 1 area is 'in sync'. */
|
||||||
if (new_area_count == 1 && is_temporary_mirror_layer(lv)) {
|
if (new_area_count == 1 && is_temporary_mirror_layer(lv)) {
|
||||||
detached_log_lv = detach_mirror_log(mirrored_seg);
|
if (!(detached_log_lv = detach_mirror_log(mirrored_seg))) {
|
||||||
|
log_error("Cannot detach mirror log from %s..",
|
||||||
|
display_lvname(mirrored_seg->lv));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (!_init_mirror_log(lv->vg->cmd,
|
if (!_init_mirror_log(lv->vg->cmd,
|
||||||
(struct logical_volume*)lv_lock_holder(mirrored_seg->lv),
|
(struct logical_volume*)lv_lock_holder(mirrored_seg->lv),
|
||||||
detached_log_lv,
|
detached_log_lv,
|
||||||
|
Loading…
Reference in New Issue
Block a user