]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
lockdep: do not use $CEPH_LOCKDEP for g_lockdep 2983/head
authorKefu Chai <tchaikov@gmail.com>
Sun, 23 Nov 2014 19:12:24 +0000 (03:12 +0800)
committerKefu Chai <tchaikov@gmail.com>
Sun, 23 Nov 2014 19:19:40 +0000 (03:19 +0800)
* 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 <tchaikov@gmail.com>
src/common/lockdep.cc

index 26ebe10cdf26aae04a56502b336e0f5eee05a86d..6639d8ad731bbafde6311b8d396631ba86066af3 100644 (file)
@@ -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]) {