]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/mutex_debug: do lockdep post-lock step in caller
authorSage Weil <sage@redhat.com>
Mon, 15 Oct 2018 13:55:39 +0000 (08:55 -0500)
committerSage Weil <sage@redhat.com>
Mon, 15 Oct 2018 13:55:39 +0000 (08:55 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/common/mutex_debug.cc
src/common/mutex_debug.h

index febc21fa16b883a3a2104094e4db49c59858e7e5..c6b93527199e92f01e15cb553a6ce7d4552e372a 100644 (file)
@@ -64,8 +64,6 @@ ceph::mono_time mutex_debugging_base::before_lock_blocks() {
 
 void mutex_debugging_base::after_lock_blocks(ceph::mono_time start,
                                             bool no_lockdep) {
-  if (!no_lockdep && g_lockdep)
-    _locked();
 }
 } // namespace mutex_debug_detail
 } // namespace ceph
index af32357fd226ed3d933b7e6e0b0efb83a2153b29..accffde7816ab4f52e778631874840536bd4ba27 100644 (file)
@@ -183,6 +183,8 @@ public:
 
     auto t = before_lock_blocks();
     lock_impl();
+    if (!no_lockdep && g_lockdep)
+      _locked();
     after_lock_blocks(t, no_lockdep);
     _post_lock();
   }