]> sourceware.org Git - lvm2.git/commitdiff
debug: use common error exit path
authorZdenek Kabelac <zkabelac@redhat.com>
Wed, 9 Aug 2023 11:19:08 +0000 (13:19 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 14 Aug 2023 15:02:11 +0000 (17:02 +0200)
tools/lvconvert.c

index 785d8816f2a75a16c0633607809b52594f82a0bb..d25791fb0299295be2ed9cc672d772297ab08900 100644 (file)
@@ -6302,7 +6302,7 @@ int lvconvert_writecache_attach_single(struct cmd_context *cmd,
 
        if (!_writecache_zero(cmd, lv_fast)) {
                log_error("LV %s could not be zeroed.", display_lvname(lv_fast));
-               return ECMD_FAILED;
+               goto bad;
        }
 
        /*
@@ -6312,10 +6312,10 @@ int lvconvert_writecache_attach_single(struct cmd_context *cmd,
         */
        if (dm_snprintf(cvol_name, sizeof(cvol_name), "%s_cvol", lv_fast->name) < 0) {
                log_error("Can't prepare new metadata name for %s.", display_lvname(lv_fast));
-               return ECMD_FAILED;
+               goto bad;
        }
        if (!lv_rename_update(cmd, lv_fast, cvol_name, 0))
-               return_ECMD_FAILED;
+               goto_bad;
 
        lv_fast->status |= LV_CACHE_VOL;
 
This page took 0.037289 seconds and 5 git commands to generate.