Skip to content

Commit

Permalink
locking/lockdep: Shrink struct lock_class_key
Browse files Browse the repository at this point in the history
Shrink struct lock_class_key; we never store anything in subkeys[], we
only use the addresses.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Feb 28, 2019
1 parent 72dcd50 commit 28d49e2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/linux/lockdep.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ struct lockdep_subclass_key {

/* hash_entry is used to keep track of dynamically allocated keys. */
struct lock_class_key {
struct hlist_node hash_entry;
struct lockdep_subclass_key subkeys[MAX_LOCKDEP_SUBCLASSES];
union {
struct hlist_node hash_entry;
struct lockdep_subclass_key subkeys[MAX_LOCKDEP_SUBCLASSES];
};
};

extern struct lock_class_key __lockdep_no_validate__;
Expand Down

0 comments on commit 28d49e2

Please sign in to comment.