mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 06:14:39 +01:00
Reintroduce dynamically-allocated LockClassKeys such that they are automatically (de)registered. Require that all usages of LockClassKeys ensure that they are Pin'd. Currently, only `'static` LockClassKeys are supported, so Pin is redundant. However, it is intended that dynamically-allocated LockClassKeys will eventually be supported, so using Pin from the outset will make that change simpler. Closes: https://github.com/Rust-for-Linux/linux/issues/1102 Suggested-by: Benno Lossin <[email protected]> Suggested-by: Boqun Feng <[email protected]> Signed-off-by: Mitchell Levy <[email protected]> Signed-off-by: Boqun Feng <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Reviewed-by: Benno Lossin <[email protected]> Link: https://lore.kernel.org/r/[email protected]
14 lines
258 B
C
14 lines
258 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#include <linux/lockdep.h>
|
|
|
|
void rust_helper_lockdep_register_key(struct lock_class_key *k)
|
|
{
|
|
lockdep_register_key(k);
|
|
}
|
|
|
|
void rust_helper_lockdep_unregister_key(struct lock_class_key *k)
|
|
{
|
|
lockdep_unregister_key(k);
|
|
}
|