mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 06:10:56 +00:00
maple_tree: relax lockdep checks for on-stack trees
To support early release of the maple tree locks, do not lockdep check the lock if it is set to NULL. This is intended for the special case on-stack use of tracking entries and not for general use. Link: https://lkml.kernel.org/r/20230714195551.894800-3-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oliver Sang <oliver.sang@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
2574d5e4df
commit
134d153c93
1 changed files with 3 additions and 1 deletions
|
@ -182,7 +182,9 @@ enum maple_type {
|
||||||
|
|
||||||
#ifdef CONFIG_LOCKDEP
|
#ifdef CONFIG_LOCKDEP
|
||||||
typedef struct lockdep_map *lockdep_map_p;
|
typedef struct lockdep_map *lockdep_map_p;
|
||||||
#define mt_lock_is_held(mt) lock_is_held(mt->ma_external_lock)
|
#define mt_lock_is_held(mt) \
|
||||||
|
(!(mt)->ma_external_lock || lock_is_held((mt)->ma_external_lock))
|
||||||
|
|
||||||
#define mt_set_external_lock(mt, lock) \
|
#define mt_set_external_lock(mt, lock) \
|
||||||
(mt)->ma_external_lock = &(lock)->dep_map
|
(mt)->ma_external_lock = &(lock)->dep_map
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue