Skip to contentSkip to conversation

master - lockd: check for unlock failure in all cases

PATCH David Teigland 1 participant 1 message Sep 3, 2015

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9e8b3d4a9825ecca3dc7a71f6379b63a27d6fa8c
Commit:        9e8b3d4a9825ecca3dc7a71f6379b63a27d6fa8c
Parent:        c27015368b590dc42f15ef8d55faa279e912666a
Author:        David Teigland <[email protected]>
AuthorDate:    Thu Sep 3 13:47:54 2015 -0500
Committer:     David Teigland <[email protected]>
CommitterDate: Thu Sep 3 16:47:54 2015 -0500

lockd: check for unlock failure in all cases

This suppresses an unwanted error message.

---
 lib/locking/lvmlockd.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
lib/locking/lvmlockd.c +4 -4
index 983ecc9..a726d87 100644
@@ -1454,6 +1454,10 @@ int lockd_gl(struct cmd_context *cmd, const char *def_mode, uint32_t flags)
 		}
 	}
 
+
+	if (!strcmp(mode, "un"))
+		return 1;
+
 	/*
 	 * ENOLS: no lockspace was found with a global lock.
 	 * The VG with the global lock may not be visible or started yet,
@@ -1473,10 +1477,6 @@ int lockd_gl(struct cmd_context *cmd, const char *def_mode, uint32_t flags)
 	    result == -ESTARTING ||
 	    result == -EVGKILLED ||
 	    result == -ELOCKIO) {
-
-		if (!strcmp(mode, "un"))
-			return 1;
-
 		/*
 		 * If an ex global lock fails, then the command fails.
 		 */