From f727bfb7f0e5aba6bf88a94efcc752284976bcee Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 15 Oct 2018 08:55:39 -0500 Subject: [PATCH] common/mutex_debug: do lockdep post-lock step in caller Signed-off-by: Sage Weil --- src/common/mutex_debug.cc | 2 -- src/common/mutex_debug.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/mutex_debug.cc b/src/common/mutex_debug.cc index febc21fa16b88..c6b93527199e9 100644 --- a/src/common/mutex_debug.cc +++ b/src/common/mutex_debug.cc @@ -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 diff --git a/src/common/mutex_debug.h b/src/common/mutex_debug.h index af32357fd226e..accffde7816ab 100644 --- a/src/common/mutex_debug.h +++ b/src/common/mutex_debug.h @@ -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(); } -- 2.39.5