mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
Fix pvchange segfault with orphans.
This commit is contained in:
parent
4af5827d07
commit
8fd6f4b6fb
@ -131,7 +131,7 @@ static int _pvchange_single(struct cmd_context *cmd, struct physical_volume *pv,
|
|||||||
backup(vg);
|
backup(vg);
|
||||||
unlock_vg(cmd, pv->vg_name);
|
unlock_vg(cmd, pv->vg_name);
|
||||||
} else {
|
} else {
|
||||||
if (!(pv_write(cmd, pv, &mdas, (int64_t) sector))) {
|
if (!(pv_write(cmd, pv, NULL, INT64_C(-1)))) {
|
||||||
unlock_vg(cmd, ORPHAN);
|
unlock_vg(cmd, ORPHAN);
|
||||||
log_error("Failed to store physical volume \"%s\"",
|
log_error("Failed to store physical volume \"%s\"",
|
||||||
pv_name);
|
pv_name);
|
||||||
|
Loading…
Reference in New Issue
Block a user