This is the mail archive of the lvm2-cvs@sourceware.org mailing list for the LVM2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

LVM2/liblvm lvm_vg.c


CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2009-07-22 03:13:36

Modified files:
	liblvm         : lvm_vg.c 

Log message:
	Fix lvm_vg_close() when locking fails.
	
	Author: Dave Wysochanski <dwysocha@redhat.com>

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm_vg.c.diff?cvsroot=lvm2&r1=1.1&r2=1.2

--- LVM2/liblvm/lvm_vg.c	2009/07/14 03:02:14	1.1
+++ LVM2/liblvm/lvm_vg.c	2009/07/22 03:13:35	1.2
@@ -64,13 +64,11 @@
 
 int lvm_vg_close(vg_t *vg)
 {
-	if (vg_read_error(vg))
-		goto_bad;
-
-	unlock_and_release_vg(vg->cmd, vg, vg->name);
+	if (vg_read_error(vg) == FAILED_LOCKING)
+		vg_release(vg);
+	else
+		unlock_and_release_vg(vg->cmd, vg, vg->name);
 	return 1;
-bad:
-	return 0;
 }
 
 int lvm_vg_remove(vg_t *vg)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]