diff options
| author | Liam R. Howlett (Oracle) <liam@infradead.org> | 2026-06-30 15:08:27 -0400 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-07-02 23:27:24 -0700 |
| commit | bce4c5de6b37534422257cc7992af2bafa5691f0 (patch) | |
| tree | 0d22ecd424403607f8ef22f37131eb38c75cc9c4 /include | |
| parent | 6ea9e7451396a42437be1f965309e23780884924 (diff) | |
| download | linux-next-bce4c5de6b37534422257cc7992af2bafa5691f0.tar.gz linux-next-bce4c5de6b37534422257cc7992af2bafa5691f0.zip | |
maple_tree: add write lock checking with lockdep sequence numbers
Use the lockdep sequence numbers to ensure the write lock is not dropped
between write operations. The lockdep sequence is recorded on any walk
that starts from the top of the tree and re-checked prior to any operation
using an active node.
Link: https://lore.kernel.org/20260630190843.3563858-4-liam@infradead.org
Signed-off-by: Liam R. Howlett (Oracle) <liam@infradead.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Chris Mason <clm@meta.com>
Cc: Chuck Lever <cel@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Joe Perches <joe@perches.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Waiman Long <longman@redhat.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/maple_tree.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/maple_tree.h b/include/linux/maple_tree.h index 11a16c3508dc..220b380cdd49 100644 --- a/include/linux/maple_tree.h +++ b/include/linux/maple_tree.h @@ -485,9 +485,12 @@ struct ma_state { unsigned char mas_flags; unsigned char end; /* The end of the node */ enum store_type store_type; /* The type of store needed for this operation */ -#if IS_ENABLED(CONFIG_LOCKDEP) && IS_ENABLED(CONFIG_RCU_STRICT_GRACE_PERIOD) +#ifdef CONFIG_LOCKDEP + u32 ld_seq; +#ifdef CONFIG_RCU_STRICT_GRACE_PERIOD unsigned long rcu_gp; -#endif +#endif /* CONFIG_RCU_STRICT_GRACE_PERIOD */ +#endif /* CONFIG_LOCKDEP */ }; struct ma_wr_state { |
