1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-08 08:58:50 +03:00

lvconvert: move log message to fix segfault

log message was printing lv name from released vg
This commit is contained in:
David Teigland 2020-10-02 09:23:25 -05:00
parent 0143c7aebe
commit 91f869e43c

View File

@ -5774,14 +5774,15 @@ static int _lvconvert_detach_writecache_when_clean(struct cmd_context *cmd,
backup(vg); backup(vg);
out_release: out_release:
if (ret)
log_print_unless_silent("Logical volume %s write cache has been detached.", display_lvname(lv));
unlock_and_release_vg(cmd, vg, vg->name); unlock_and_release_vg(cmd, vg, vg->name);
out_lockd: out_lockd:
if (!lockd_vg(cmd, id->vg_name, "un", 0, &lockd_state)) if (!lockd_vg(cmd, id->vg_name, "un", 0, &lockd_state))
stack; stack;
if (ret)
log_print_unless_silent("Logical volume %s write cache has been detached.", display_lvname(lv));
return ret; return ret;
} }