From: Sage Weil Date: Mon, 15 Oct 2018 13:55:39 +0000 (-0500) Subject: common/mutex_debug: do lockdep post-lock step in caller X-Git-Tag: v14.0.1~18^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f727bfb7f0e5aba6bf88a94efcc752284976bcee;p=ceph.git common/mutex_debug: do lockdep post-lock step in caller Signed-off-by: Sage Weil --- diff --git a/src/common/mutex_debug.cc b/src/common/mutex_debug.cc index febc21fa16b8..c6b93527199e 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 af32357fd226..accffde7816a 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(); }