[PATCH v2 1/5] maple_tree: remove lockdep_map_p typedef

Danilo Krummrich dakr at kernel.org
Tue Aug 19 03:49:18 PDT 2025


On Tue Aug 19, 2025 at 12:34 PM CEST, Alice Ryhl wrote:
> Having the ma_external_lock field exist when CONFIG_LOCKDEP=n isn't used
> anywhere, so just get rid of it. This also avoids generating a typedef
> called lockdep_map_p that could overlap with typedefs in other header
> files.
>
> With this change, bindgen will generate better definitions for this
> union, which makes it nicer to use from Rust. This avoids a cast in the
> Rust abstractions for the maple tree, ensuring that Rust's type checker
> will notice at build-time if ma_lock is changed from spinlock_t to
> something else.
>
> Signed-off-by: Alice Ryhl <aliceryhl at google.com>

Reviewed-by: Danilo Krummrich <dakr at kernel.org>



More information about the maple-tree mailing list