rcu: Fix rcu_lock_map build failure on CONFIG_PROVE_LOCKING=y
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 23 Sep 2009 23:18:13 +0000 (16:18 -0700)
committerIngo Molnar <mingo@elte.hu>
Mon, 5 Oct 2009 19:01:28 +0000 (21:01 +0200)
Move the rcu_lock_map definition from rcutree.c to rcupdate.c so that
TINY_RCU can use lockdep.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/rcupdate.c
kernel/rcutree.c

index 8e795133b33d0db228f87e27a064e4ae34ec8494..4a189ea18b48a19bc61ff60f45d1bb20798e6aa8 100644 (file)
 #include <linux/module.h>
 #include <linux/kernel_stat.h>
 
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+static struct lock_class_key rcu_lock_key;
+struct lockdep_map rcu_lock_map =
+       STATIC_LOCKDEP_MAP_INIT("rcu_read_lock", &rcu_lock_key);
+EXPORT_SYMBOL_GPL(rcu_lock_map);
+#endif
+
 enum rcu_barrier {
        RCU_BARRIER_STD,
        RCU_BARRIER_BH,
index 8e52cde7b8f76df7e484b15b9571301dddfe001c..81af59b8dd8865f4cd0e1291427d04ebadbac740 100644 (file)
 
 #include "rcutree.h"
 
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-static struct lock_class_key rcu_lock_key;
-struct lockdep_map rcu_lock_map =
-       STATIC_LOCKDEP_MAP_INIT("rcu_read_lock", &rcu_lock_key);
-EXPORT_SYMBOL_GPL(rcu_lock_map);
-#endif
-
 /* Data structures. */
 
 #define RCU_STATE_INITIALIZER(name) { \