Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44470
b: refs/heads/master
c: 81fc685
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Dec 13, 2006
1 parent f7264d0 commit cf13b35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a664089741aa9010333ecbdadbf5d9de62bafa2d
refs/heads/master: 81fc685a898f84d0787eeebb1c118de0bd3484a0
8 changes: 6 additions & 2 deletions trunk/kernel/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force)
* add it and return 0 - in this case the new dependency chain is
* validated. If the key is already hashed, return 1.
*/
static inline int lookup_chain_cache(u64 chain_key)
static inline int lookup_chain_cache(u64 chain_key, struct lock_class *class)
{
struct list_head *hash_head = chainhashentry(chain_key);
struct lock_chain *chain;
Expand All @@ -1286,9 +1286,13 @@ static inline int lookup_chain_cache(u64 chain_key)
__raw_spin_lock(&hash_lock);
return 1;
#endif
if (very_verbose(class))
printk("\nhash chain already cached, key: %016Lx tail class: [%p] %s\n", chain_key, class->key, class->name);
return 0;
}
}
if (very_verbose(class))
printk("\nnew hash chain, key: %016Lx tail class: [%p] %s\n", chain_key, class->key, class->name);
/*
* Allocate a new chain entry from the static array, and add
* it to the hash:
Expand Down Expand Up @@ -2139,7 +2143,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
* (If lookup_chain_cache() returns with 1 it acquires
* hash_lock for us)
*/
if (!trylock && (check == 2) && lookup_chain_cache(chain_key)) {
if (!trylock && (check == 2) && lookup_chain_cache(chain_key, class)) {
/*
* Check whether last held lock:
*
Expand Down

0 comments on commit cf13b35

Please sign in to comment.