]> sourceware.org Git - lvm2.git/commitdiff
Unlock vg when requested automatic update failed.
authorMilan Broz <mbroz@redhat.com>
Wed, 10 Jun 2009 10:15:28 +0000 (10:15 +0000)
committerMilan Broz <mbroz@redhat.com>
Wed, 10 Jun 2009 10:15:28 +0000 (10:15 +0000)
(fixes previous commit)

tools/toollib.c

index c8e1f61f6983f925abf1b94839338579fdef6ee2..cec10cd4321e1883f35734b11ce19440557e7604 100644 (file)
@@ -497,8 +497,10 @@ static int _process_one_vg(struct cmd_context *cmd, const char *vg_name,
                        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;
                }
This page took 0.037821 seconds and 5 git commands to generate.