Skip to contentSkip to conversation

master - activation: also lock memory for clustered locking

PATCH Zdenek Kabelac 1 participant 1 message Dec 4, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=698483b5a1bc71e3f48581e2e0bbc269e7d237a9
Commit:        698483b5a1bc71e3f48581e2e0bbc269e7d237a9
Parent:        406b566cfc4be2cc04157ea7bd3c24ea729a4bb5
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Mon Dec 4 18:40:37 2017 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Mon Dec 4 23:33:02 2017 +0100

activation: also lock memory for clustered locking

Commit c086dfadc389551b9a2d7b4c26931e5e74ada8d6 missed to lock memory for clustering suspend part since it's using differnt locking reason.

---
 lib/mm/memlock.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
lib/mm/memlock.c +3 -1
index 7edd9de..f72b86c 100644
@@ -602,7 +602,9 @@ static void _unlock_mem_if_possible(struct cmd_context *cmd)
  */
 void critical_section_inc(struct cmd_context *cmd, const char *reason)
 {
-	if (!_critical_section && (strcmp(reason, "suspending") == 0)) {
+	if (!_critical_section &&
+	    ((strcmp(reason, "suspending") == 0) ||
+	     (strcmp(reason, "locking for suspend") == 0))) {
 		/*
 		 * Profiles are loaded on-demand so make sure that before
 		 * entering the critical section all needed profiles are