Bit spinlocks are problematic if PREEMPT_RT is enabled. They disable preemption, which is undesired for latency reasons and breaks when regular spinlocks are taken within the bit_spinlock locked region because regular spinlocks are converted to 'sleeping spinlocks' on RT. Bit spinlocks are also not covered by lock debugging, e.g. lockdep. With the spinlock substitution in place, they can be exposed via a new config switch: CONFIG_DEBUG_BIT_SPINLOCKS. This series handles only buffer head and jbd2, but does not touch the hlist_bl bit-spinlock usage. See V1 for further details: https://lkml.kernel.org/r/20190730112452.871257694@xxxxxxxxxxxxx Changes vs. V1: - Collected reviewed-by tags for the BH_Uptodate part - Reworked the JBD2 part according to Jan's review: - Convert state lock to a regular spinlock unconditionally - Refactor jbd2_journal_put_journal_head() to be RT friendly by restricting the bit-spinlock held section to the minimum required operations. That part is probably over-engineered, but I'm sure Jan will tell me sooner than later. Thanks, tglx