master - lvmlockd: avoid double unlock of client_mutex
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=288e10cf8b990cd740fba409d6f20525209f4f43 Commit: 288e10cf8b990cd740fba409d6f20525209f4f43 Parent: b3b1e788e16c77f6784f30b8e984f68792f8fa1a Author: Zdenek Kabelac <[email protected]> AuthorDate: Fri Aug 25 14:07:45 2017 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Fri Aug 25 14:20:59 2017 +0200
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.
--- WHATS_NEW | 1 + daemons/lvmlockd/lvmlockd-core.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)
WHATS_NEW +1 -0
@@ -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.
daemons/lvmlockd/lvmlockd-core.c +2 -2
@@ -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 ;