Thomas Gleixner 7b5ff4bb9a sched: Make cond_resched_*lock() variants consistent vs. might_sleep()
Commit 3427445afd26 ("sched: Exclude cond_resched() from nested sleep
test") removed the task state check of __might_sleep() for
cond_resched_lock() because cond_resched_lock() is not a voluntary
scheduling point which blocks. It's a preemption point which requires the
lock holder to release the spin lock.

The same rationale applies to cond_resched_rwlock_read/write(), but those
were not touched.

Make it consistent and use the non-state checking __might_resched() there
as well.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210923165357.991262778@linutronix.de
2021-10-01 13:57:50 +02:00
..
2021-09-07 13:52:46 -07:00
2021-08-17 22:28:39 -04:00
2021-08-30 14:57:03 +02:00
2021-09-11 14:48:42 -07:00