A direct lock dependency, such as L1 -> L2, may be in many lock chains.
These newly added fields in struct lock_list and lock_chain will be used
to associate lock chains to lock dependencies.
No functional change.
Signed-off-by: Yuyang Du <[email protected]>
---
include/linux/lockdep.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 151d557..3c6fb63 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -191,6 +191,7 @@ static inline void lockdep_copy_map(struct lockdep_map *to,
*/
struct lock_list {
struct list_head entry;
+ struct list_head chains;
struct lock_class *class;
struct lock_class *links_to;
struct lock_trace trace;
@@ -210,6 +211,7 @@ struct lock_list {
* @depth: the number of held locks in this chain
* @base: the index in chain_hlocks for this chain
* @entry: the collided lock chains in lock_chain hash list
+ * @chain_entry: the link to the next lock_chain in the same dependency
* @chain_key: the hash key of this lock_chain
*/
struct lock_chain {
@@ -219,6 +221,7 @@ struct lock_chain {
base : 24;
/* 4 byte hole */
struct hlist_node entry;
+ struct list_head chain_entry;
u64 chain_key;
};
--
1.8.3.1