Skip to contentSkip to conversation

LVM2/tools toollib.c

PATCH [email protected] 1 participant 1 message Jun 10, 2009

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz at sourceware.org 2009-06-10 10:15:29

Modified files:
tools : toollib.c

Log message:
Unlock vg when requested automatic update failed.

(fixes previous commit)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/toollib.c.diff?cvsroot=lvm2&r1=1.156&r2=1.157

tools/toollib.c +3 -1
@@ -497,8 +497,10 @@
 			unlock_and_release_vg(cmd, vg, vg_name);
 			dev_close_all();
 			log_error("Volume group %s inconsistent", vg_name);
-			if (!(vg = recover_vg(cmd, vg_name, LCK_VG_WRITE)))
+			if (!(vg = recover_vg(cmd, vg_name, LCK_VG_WRITE))) {
+				unlock_vg(cmd, vg_name);
 				return ECMD_FAILED;
+			}
 			consistent = 1;
 			break;
 		}