Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 245407
b: refs/heads/master
c: e0944ee
h: refs/heads/master
i:
  245405: 558abce
  245403: 987af99
  245399: 923960d
  245391: c944d6b
  245375: c537cee
v: v3
  • Loading branch information
Steven Rostedt authored and Ingo Molnar committed Apr 22, 2011
1 parent 5469802 commit 5193e87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 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: 282b5c2f6f663c008444321fd8fcdd374596046b
refs/heads/master: e0944ee63f7249802be74454cef81c97630ae1cd
14 changes: 4 additions & 10 deletions trunk/kernel/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -1973,7 +1973,7 @@ static inline int lookup_chain_cache(struct task_struct *curr,
struct list_head *hash_head = chainhashentry(chain_key);
struct lock_chain *chain;
struct held_lock *hlock_curr, *hlock_next;
int i, j, n, cn;
int i, j;

if (DEBUG_LOCKS_WARN_ON(!irqs_disabled()))
return 0;
Expand Down Expand Up @@ -2033,15 +2033,9 @@ static inline int lookup_chain_cache(struct task_struct *curr,
}
i++;
chain->depth = curr->lockdep_depth + 1 - i;
cn = nr_chain_hlocks;
while (cn + chain->depth <= MAX_LOCKDEP_CHAIN_HLOCKS) {
n = cmpxchg(&nr_chain_hlocks, cn, cn + chain->depth);
if (n == cn)
break;
cn = n;
}
if (likely(cn + chain->depth <= MAX_LOCKDEP_CHAIN_HLOCKS)) {
chain->base = cn;
if (likely(nr_chain_hlocks + chain->depth <= MAX_LOCKDEP_CHAIN_HLOCKS)) {
chain->base = nr_chain_hlocks;
nr_chain_hlocks += chain->depth;
for (j = 0; j < chain->depth - 1; j++, i++) {
int lock_id = curr->held_locks[i].class_idx - 1;
chain_hlocks[chain->base + j] = lock_id;
Expand Down

0 comments on commit 5193e87

Please sign in to comment.