From 5193e871baa72aa82ac670632c9a9eee8e4ecada Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Wed, 20 Apr 2011 21:42:00 -0400 Subject: [PATCH] --- yaml --- r: 245407 b: refs/heads/master c: e0944ee63f7249802be74454cef81c97630ae1cd h: refs/heads/master i: 245405: 558abcecdd1807c15e84394c8eea661ddc4e4578 245403: 987af9903337f085046abe32bebccc47c9f0ba21 245399: 923960db21001001709a64bb9c86d80c9f18f0f7 245391: c944d6ba1f99b8158f90f59d32ddb452882f5cb6 245375: c537cee65b20df850f3a224882d0ebfe29c4fe30 v: v3 --- [refs] | 2 +- trunk/kernel/lockdep.c | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 60b922ae5f4c..210727abbfd2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 282b5c2f6f663c008444321fd8fcdd374596046b +refs/heads/master: e0944ee63f7249802be74454cef81c97630ae1cd diff --git a/trunk/kernel/lockdep.c b/trunk/kernel/lockdep.c index 27c609f3eae5..63437d065ac8 100644 --- a/trunk/kernel/lockdep.c +++ b/trunk/kernel/lockdep.c @@ -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; @@ -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;