X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=kernel%2Flockdep.c;h=81a4e4a3f087adfc650eb6baf2c05147f209e062;hb=6329d3021bcfa9038621e6e917d98929421d8ec8;hp=3574379f4d62d2d04c9431c0c2172dc044d0ca66;hpb=9b73e76f3cf63379dcf45fcd4f112f5812418d0a;p=linux-2.6 diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 3574379f4d..81a4e4a3f0 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -779,6 +779,10 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force) * parallel walking of the hash-list safe: */ list_add_tail_rcu(&class->hash_entry, hash_head); + /* + * Add it to the global list of classes: + */ + list_add_tail_rcu(&class->lock_entry, &all_lock_classes); if (verbose(class)) { graph_unlock(); @@ -2282,10 +2286,6 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this, return 0; break; case LOCK_USED: - /* - * Add it to the global list of classes: - */ - list_add_tail_rcu(&this->class->lock_entry, &all_lock_classes); debug_atomic_dec(&nr_unused_locks); break; default: