1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

vg: use vg_copy_struct in second location

This commit is contained in:
David Teigland 2024-10-11 17:02:31 -05:00
parent 18babdc3ac
commit 77305127e4

View File

@ -5175,9 +5175,11 @@ struct volume_group *vg_read(struct cmd_context *cmd, const char *vg_name, const
goto out;
}
if (!(vg->vg_committed = import_vg_from_config_tree(cmd, vg->fid, vg->committed_cft))) {
log_error("Failed to import written VG.");
goto out;
if (!(vg->vg_committed = vg_copy_struct(vg))) {
if (!(vg->vg_committed = import_vg_from_config_tree(cmd, vg->fid, vg->committed_cft))) {
log_error("Failed to import written VG.");
goto out;
}
}
} else {
if (vg->vg_precommitted)