From 5470914f73d95d0af1fff7e40930c83facf663c6 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 24 Nov 2014 03:12:24 +0800 Subject: [PATCH] lockdep: do not use $CEPH_LOCKDEP for g_lockdep * a non-zero CEPH_LOCKDEP brings ceph down because g_lockdep_ceph_ctx is still being constructed when dout_impl() dereferences it. * fix a typo in comment. * remove dead code. Signed-off-by: Kefu Chai --- src/common/lockdep.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/common/lockdep.cc b/src/common/lockdep.cc index 26ebe10cdf26a..6639d8ad731bb 100644 --- a/src/common/lockdep.cc +++ b/src/common/lockdep.cc @@ -34,14 +34,12 @@ CEPH_HASH_NAMESPACE_END #endif /******* Constants **********/ -#undef DOUT_COND -#define DOUT_COND(cct, l) cct && l <= XDOUT_CONDVAR(cct, dout_subsys) #define lockdep_dout(v) lsubdout(g_lockdep_ceph_ctx, lockdep, v) #define MAX_LOCKS 2000 // increase me as needed #define BACKTRACE_SKIP 2 /******* Globals **********/ -int g_lockdep = get_env_int("CEPH_LOCKDEP"); +int g_lockdep = 0; struct lockdep_stopper_t { // disable lockdep when this module destructs. ~lockdep_stopper_t() { @@ -140,7 +138,7 @@ int lockdep_register(const char *name) } -// does a follow b? +// does b follow a? static bool does_follow(int a, int b) { if (follows[a][b]) { -- 2.47.3