Skip to content

Commit a97b43f

Browse files
author
Kent Overstreet
committed
lockdep: Add comments for lockdep_set_no{validate,track}_class()
Cc: Waiman Long <[email protected]> Signed-off-by: Kent Overstreet <[email protected]>
1 parent 6f719cb commit a97b43f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

include/linux/lockdep.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,24 @@ static inline void lockdep_init_map(struct lockdep_map *lock, const char *name,
178178
(lock)->dep_map.wait_type_outer, \
179179
(lock)->dep_map.lock_type)
180180

181+
/**
182+
* lockdep_set_novalidate_class: disable checking of lock ordering on a given
183+
* lock
184+
* @lock: Lock to mark
185+
*
186+
* Lockdep will still record that this lock has been taken, and print held
187+
* instances when dumping locks
188+
*/
181189
#define lockdep_set_novalidate_class(lock) \
182190
lockdep_set_class_and_name(lock, &__lockdep_no_validate__, #lock)
183191

192+
/**
193+
* lockdep_set_notrack_class: disable lockdep tracking of a given lock entirely
194+
* @lock: Lock to mark
195+
*
196+
* Bigger hammer than lockdep_set_novalidate_class: so far just for bcachefs,
197+
* which takes more locks than lockdep is able to track (48).
198+
*/
184199
#define lockdep_set_notrack_class(lock) \
185200
lockdep_set_class_and_name(lock, &__lockdep_no_track__, #lock)
186201

0 commit comments

Comments
 (0)