diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2017-08-25 14:07:45 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2017-08-25 14:20:59 +0200 |
commit | 288e10cf8b990cd740fba409d6f20525209f4f43 (patch) | |
tree | 16fc02bd6d7c322e2b90c7f7f036c41d384f2732 | |
parent | b3b1e788e16c77f6784f30b8e984f68792f8fa1a (diff) | |
download | lvm2-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_NEW | 1 | ||||
-rw-r--r-- | daemons/lvmlockd/lvmlockd-core.c | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -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; |