From 51783676fb8036832a08094fa34fd9458ee13711 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 29 Nov 2013 20:29:38 +0100 Subject: [PATCH] cleanup: swap condition logic Use easier to follow logic of code. When checking for merging origin, do a merging. --- tools/lvconvert.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/lvconvert.c b/tools/lvconvert.c index 273f56a86..84479fee7 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -780,12 +780,12 @@ int lvconvert_poll(struct cmd_context *cmd, struct logical_volume *lv, memcpy(uuid, &lv->lvid, sizeof(lv->lvid)); - if (!lv_is_merging_origin(lv)) - return poll_daemon(cmd, lv_full_name, uuid, background, 0, - &_lvconvert_mirror_fns, "Converted"); - else + if (lv_is_merging_origin(lv)) return poll_daemon(cmd, lv_full_name, uuid, background, 0, &_lvconvert_merge_fns, "Merged"); + + return poll_daemon(cmd, lv_full_name, uuid, background, 0, + &_lvconvert_mirror_fns, "Converted"); } static int _insert_lvconvert_layer(struct cmd_context *cmd,