VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Thomas Gleixner <tglx@linutronix.de> 2021-09-23 18:54:37 +0200 committer: Minda Chen <minda.chen@starfivetech.com> 2023-11-06 19:24:42 +0800 commit: 6048de7a52451bf930f020b1b698272948091254 parent: dfec74f3008ebf8c9335082f88d609b908948e4b
Commit Summary:
sched: Make cond_resched_*lock() variants consistent vs. might_sleep()
Diffstat:
1 file changed, 6 insertions, 6 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 150670bbc3d6..64e9bdb5d523 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2062,14 +2062,14 @@ extern int __cond_resched_rwlock_write(rwlock_t *lock);
 	__cond_resched_lock(lock);					\
 })
 
-#define cond_resched_rwlock_read(lock) ({			\
-	__might_sleep(__FILE__, __LINE__, PREEMPT_LOCK_OFFSET);	\
-	__cond_resched_rwlock_read(lock);			\
+#define cond_resched_rwlock_read(lock) ({				\
+	__might_resched(__FILE__, __LINE__, PREEMPT_LOCK_OFFSET);	\
+	__cond_resched_rwlock_read(lock);				\
 })
 
-#define cond_resched_rwlock_write(lock) ({			\
-	__might_sleep(__FILE__, __LINE__, PREEMPT_LOCK_OFFSET);	\
-	__cond_resched_rwlock_write(lock);			\
+#define cond_resched_rwlock_write(lock) ({				\
+	__might_resched(__FILE__, __LINE__, PREEMPT_LOCK_OFFSET);	\
+	__cond_resched_rwlock_write(lock);				\
 })
 
 static inline void cond_resched_rcu(void)