Skip to content

Commit 28d49e2

Browse files
Peter ZijlstraIngo Molnar
authored andcommitted
locking/lockdep: Shrink struct lock_class_key
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>
1 parent 72dcd50 commit 28d49e2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/linux/lockdep.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ struct lockdep_subclass_key {
5858

5959
/* hash_entry is used to keep track of dynamically allocated keys. */
6060
struct lock_class_key {
61-
struct hlist_node hash_entry;
62-
struct lockdep_subclass_key subkeys[MAX_LOCKDEP_SUBCLASSES];
61+
union {
62+
struct hlist_node hash_entry;
63+
struct lockdep_subclass_key subkeys[MAX_LOCKDEP_SUBCLASSES];
64+
};
6365
};
6466

6567
extern struct lock_class_key __lockdep_no_validate__;

0 commit comments

Comments
 (0)