[patch V3 24/64] locking/rtmutex: Prevent future include recursion hell

From: Thomas Gleixner
Date: Thu Aug 05 2021 - 11:43:15 EST


From: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>

rtmutex only needs raw_spinlock_t, but it includes spinlock_types.h which
is not a problem on an non RT enabled kernel.

RT kernels substitute regular spinlocks with 'sleeping' spinlocks which
are based on rtmutexes and therefore must be able to include rtmutex.h.

Include spinlock_types_raw.h instead.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
include/linux/rtmutex.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
--- a/include/linux/rtmutex.h
+++ b/include/linux/rtmutex.h
@@ -15,7 +15,7 @@

#include <linux/linkage.h>
#include <linux/rbtree.h>
-#include <linux/spinlock_types.h>
+#include <linux/spinlock_types_raw.h>

extern int max_lock_depth; /* for sysctl */