]> sourceware.org Git - lvm2.git/commitdiff
lvmlockd: avoid double unlock of client_mutex
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 25 Aug 2017 12:07:45 +0000 (14:07 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 25 Aug 2017 12:20:59 +0000 (14:20 +0200)
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
daemons/lvmlockd/lvmlockd-core.c

index ac69c16e6bf7d3465f9be63beff25728c5e45219..32bbc4194be39a9207ddc90307931c6fe8eb59d8 100644 (file)
--- 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.
index 36d84e2e4baf810bd9eaa5f04dd1e2a745a09deb..253d86bbcb7f998e2b4e43e05d7227300e28c765 100644 (file)
@@ -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;
This page took 0.043676 seconds and 5 git commands to generate.