All of lore.kernel.org
 help / color / mirror / Atom feed
* master - lvmapp: do not unlock not locked VGs
@ 2018-05-15 20:05 Zdenek Kabelac
  0 siblings, 0 replies; only message in thread
From: Zdenek Kabelac @ 2018-05-15 20:05 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=fb0aca86f847fc13d9a9e4cc933085644e5ce29f
Commit:        fb0aca86f847fc13d9a9e4cc933085644e5ce29f
Parent:        99cd7108d3c589fb8ebbd636c98881cfee30e868
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Tue May 15 21:58:40 2018 +0200
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Tue May 15 22:02:41 2018 +0200

lvmapp: do not unlock not locked VGs

After recent changes this seems to give some help, explore more...
---
 liblvm/lvm_vg.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/liblvm/lvm_vg.c b/liblvm/lvm_vg.c
index 616c78f..ee6fa4e 100644
--- a/liblvm/lvm_vg.c
+++ b/liblvm/lvm_vg.c
@@ -186,6 +186,8 @@ int lvm_vg_close(vg_t vg)
 	struct saved_env e = store_user_env(vg->cmd);
 	if (vg_read_error(vg) == FAILED_LOCKING)
 		release_vg(vg);
+	else if (!lvmcache_vgname_is_locked(vg->name))
+		release_vg(vg);
 	else
 		unlock_and_release_vg(vg->cmd, vg, vg->name);
 	restore_user_env(&e);



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-05-15 20:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-15 20:05 master - lvmapp: do not unlock not locked VGs Zdenek Kabelac

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.