summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-07-18 17:17:10 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-07-18 18:33:30 -0400
commita97b43fac5b9b3ffca71b8a917a249789902fce9 (patch)
tree91d773ccf610b869c4a238a09ccd19bf3dcd6b7e
parent6f719cbe0c8b3b8a14b403b9e60fdb565fd829fe (diff)
lockdep: Add comments for lockdep_set_no{validate,track}_class()
Cc: Waiman Long <longman@redhat.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--include/linux/lockdep.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index b76f1bcd2f7f..0759e30df392 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -178,9 +178,24 @@ static inline void lockdep_init_map(struct lockdep_map *lock, const char *name,
(lock)->dep_map.wait_type_outer, \
(lock)->dep_map.lock_type)
+/**
+ * lockdep_set_novalidate_class: disable checking of lock ordering on a given
+ * lock
+ * @lock: Lock to mark
+ *
+ * Lockdep will still record that this lock has been taken, and print held
+ * instances when dumping locks
+ */
#define lockdep_set_novalidate_class(lock) \
lockdep_set_class_and_name(lock, &__lockdep_no_validate__, #lock)
+/**
+ * lockdep_set_notrack_class: disable lockdep tracking of a given lock entirely
+ * @lock: Lock to mark
+ *
+ * Bigger hammer than lockdep_set_novalidate_class: so far just for bcachefs,
+ * which takes more locks than lockdep is able to track (48).
+ */
#define lockdep_set_notrack_class(lock) \
lockdep_set_class_and_name(lock, &__lockdep_no_track__, #lock)