From c621bc3d36ee4a9fff18e7e83c5c5ac3c1e09d4f Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 23 Nov 2016 10:29:42 +0100 Subject: [PATCH] cleanup: deactivate has builtin check for active lv --- tools/lvconvert.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/lvconvert.c b/tools/lvconvert.c index 6165320a9..f50a551f1 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -1523,10 +1523,9 @@ static int _lvconvert_mirrors_aux(struct cmd_context *cmd, MIRROR_BY_LV)) { layer_lv = seg_lv(first_seg(lv), 0); if (!remove_layer_from_lv(lv, layer_lv) || - (lv_is_active(layer_lv) && - !deactivate_lv(cmd, layer_lv)) || - !lv_remove(layer_lv) || !vg_write(lv->vg) || - !vg_commit(lv->vg)) { + !deactivate_lv(cmd, layer_lv) || + !lv_remove(layer_lv) || + !vg_write(lv->vg) || !vg_commit(lv->vg)) { log_error("ABORTING: Failed to remove " "temporary mirror layer %s.", display_lvname(layer_lv)); -- 2.43.5