aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/lockdep.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-05-07 05:17:13 -0400
committerIngo Molnar <mingo@elte.hu>2009-05-07 05:17:34 -0400
commit44347d947f628060b92449702071bfe1d31dfb75 (patch)
treec6ed74610d5b3295df4296659f80f5feb94b28cc /kernel/lockdep.c
parentd94fc523f3c35bd8013f04827e94756cbc0212f4 (diff)
parent413f81eba35d6ede9289b0c8a920c013a84fac71 (diff)
Merge branch 'linus' into tracing/core
Merge reason: tracing/core was on a .30-rc1 base and was missing out on on a handful of tracing fixes present in .30-rc5-almost. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r--kernel/lockdep.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 47b201ecc6df..8bbeef996c76 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -2492,13 +2492,20 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this,
2492void lockdep_init_map(struct lockdep_map *lock, const char *name, 2492void lockdep_init_map(struct lockdep_map *lock, const char *name,
2493 struct lock_class_key *key, int subclass) 2493 struct lock_class_key *key, int subclass)
2494{ 2494{
2495 if (unlikely(!debug_locks)) 2495 lock->class_cache = NULL;
2496#ifdef CONFIG_LOCK_STAT
2497 lock->cpu = raw_smp_processor_id();
2498#endif
2499
2500 if (DEBUG_LOCKS_WARN_ON(!name)) {
2501 lock->name = "NULL";
2496 return; 2502 return;
2503 }
2504
2505 lock->name = name;
2497 2506
2498 if (DEBUG_LOCKS_WARN_ON(!key)) 2507 if (DEBUG_LOCKS_WARN_ON(!key))
2499 return; 2508 return;
2500 if (DEBUG_LOCKS_WARN_ON(!name))
2501 return;
2502 /* 2509 /*
2503 * Sanity check, the lock-class key must be persistent: 2510 * Sanity check, the lock-class key must be persistent:
2504 */ 2511 */
@@ -2507,12 +2514,11 @@ void lockdep_init_map(struct lockdep_map *lock, const char *name,
2507 DEBUG_LOCKS_WARN_ON(1); 2514 DEBUG_LOCKS_WARN_ON(1);
2508 return; 2515 return;
2509 } 2516 }
2510 lock->name = name;
2511 lock->key = key; 2517 lock->key = key;
2512 lock->class_cache = NULL; 2518
2513#ifdef CONFIG_LOCK_STAT 2519 if (unlikely(!debug_locks))
2514 lock->cpu = raw_smp_processor_id(); 2520 return;
2515#endif 2521
2516 if (subclass) 2522 if (subclass)
2517 register_lock_class(lock, subclass, 1); 2523 register_lock_class(lock, subclass, 1);
2518} 2524}