mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
devices file: remove extraneous unlock in vgchange -u
vgchange -u exit path was unlocking the devices file in cases when it wasn't needed, which produced an warning.
This commit is contained in:
parent
d14245c724
commit
bee575d678
@ -1298,15 +1298,15 @@ void device_id_update_vg_uuid(struct cmd_context *cmd, struct volume_group *vg,
|
|||||||
int update = 0;
|
int update = 0;
|
||||||
|
|
||||||
if (!cmd->enable_devices_file)
|
if (!cmd->enable_devices_file)
|
||||||
goto out;
|
return;
|
||||||
|
|
||||||
/* Without this setting there is no stacking LVs on PVs. */
|
/* Without this setting there is no stacking LVs on PVs. */
|
||||||
if (!cmd->scan_lvs)
|
if (!cmd->scan_lvs)
|
||||||
goto out;
|
return;
|
||||||
|
|
||||||
/* Check if any devices file entries are stacked on LVs. */
|
/* Check if any devices file entries are stacked on LVs. */
|
||||||
if (!_device_ids_use_lvmlv(cmd))
|
if (!_device_ids_use_lvmlv(cmd))
|
||||||
goto out;
|
return;
|
||||||
|
|
||||||
memcpy(old_vgid, old_vg_id, ID_LEN);
|
memcpy(old_vgid, old_vg_id, ID_LEN);
|
||||||
memcpy(new_vgid, &vg->id, ID_LEN);
|
memcpy(new_vgid, &vg->id, ID_LEN);
|
||||||
@ -1336,7 +1336,6 @@ void device_id_update_vg_uuid(struct cmd_context *cmd, struct volume_group *vg,
|
|||||||
if (update &&
|
if (update &&
|
||||||
!device_ids_write(cmd))
|
!device_ids_write(cmd))
|
||||||
stack;
|
stack;
|
||||||
out:
|
|
||||||
unlock_devices_file(cmd);
|
unlock_devices_file(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user