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

Fix error paths for vgcfgrestore when locking fails.

This commit is contained in:
Dave Wysochanski 2009-08-13 17:16:38 +00:00
parent 454bd4dc3b
commit cdc8e54e3d
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.52 -
=================================
Fix vgcfgrestore error paths when locking fails (2.02.49).
Added configure --enable-clogd to conditionally build the cluster log daemon.
Make lvchange --refresh only take a read lock on volume group.
Fix bug where non-blocking file locks could be granted in error.

View File

@ -45,12 +45,12 @@ int vgcfgrestore(struct cmd_context *cmd, int argc, char **argv)
if (!lock_vol(cmd, vg_name, LCK_VG_WRITE)) {
log_error("Unable to lock volume group %s", vg_name);
unlock_vg(cmd, VG_ORPHANS);
return ECMD_FAILED;
}
if (!lock_vol(cmd, VG_ORPHANS, LCK_VG_WRITE)) {
log_error("Unable to lock orphans");
unlock_vg(cmd, vg_name);
return ECMD_FAILED;
}
@ -58,8 +58,8 @@ int vgcfgrestore(struct cmd_context *cmd, int argc, char **argv)
backup_restore_from_file(cmd, vg_name,
arg_str_value(cmd, file_ARG, "")) :
backup_restore(cmd, vg_name))) {
unlock_vg(cmd, vg_name);
unlock_vg(cmd, VG_ORPHANS);
unlock_vg(cmd, vg_name);
log_error("Restore failed.");
return ECMD_FAILED;
}