summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2017-08-25 14:07:45 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2017-08-25 14:20:59 +0200
commit288e10cf8b990cd740fba409d6f20525209f4f43 (patch)
tree16fc02bd6d7c322e2b90c7f7f036c41d384f2732
parentb3b1e788e16c77f6784f30b8e984f68792f8fa1a (diff)
downloadlvm2-288e10cf8b990cd740fba409d6f20525209f4f43.tar.gz
lvmlockd: avoid double unlock of client_mutex
Avoid double unlocking of client_mutex and and unlock client_mutex in 'else' branch since it's already unlocked in 'if (cl->dead)' branch.
-rw-r--r--WHATS_NEW1
-rw-r--r--daemons/lvmlockd/lvmlockd-core.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/WHATS_NEW b/WHATS_NEW
index ac69c16e6..32bbc4194 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.174 -
=================================
+ Avoid double unlocking of client & lockspace mutexes in lvmlockd.
Fix leaking of file descriptor for non-blocking filebased locking.
Fix check for 2nd mda at end of disk fits if using pvcreate --restorefile.
Use maximum metadataarea size that fits with pvcreate --restorefile.
diff --git a/daemons/lvmlockd/lvmlockd-core.c b/daemons/lvmlockd/lvmlockd-core.c
index 36d84e2e4..253d86bbc 100644
--- a/daemons/lvmlockd/lvmlockd-core.c
+++ b/daemons/lvmlockd/lvmlockd-core.c
@@ -4761,8 +4761,8 @@ static void *client_thread_main(void *arg_in)
} else {
pthread_mutex_unlock(&cl->mutex);
}
- }
- pthread_mutex_unlock(&client_mutex);
+ } else
+ pthread_mutex_unlock(&client_mutex);
}
out:
return NULL;