Make 'cond_resched()' nullification depend on PREEMPT_BKL

Because it's not correct with a non-preemptable BKL and just causes
PREEMPT kernels to have longer latencies than non-PREEMPT ones (which is
obviously not the point of it at all).

Of course, that config option actually got removed as an option earlier,
so for now this basically disables it entirely, but if BKL preemption is
ever resurrected it will be a meaningful optimization. And in the
meantime, it at least documents the intent of the code, while not doing
the wrong thing.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

+1 -1
+1 -1
include/linux/sched.h
··· 2038 * cond_resched_softirq() will enable bhs before scheduling. 2039 */ 2040 extern int _cond_resched(void); 2041 - #ifdef CONFIG_PREEMPT 2042 static inline int cond_resched(void) 2043 { 2044 return 0;
··· 2038 * cond_resched_softirq() will enable bhs before scheduling. 2039 */ 2040 extern int _cond_resched(void); 2041 + #ifdef CONFIG_PREEMPT_BKL 2042 static inline int cond_resched(void) 2043 { 2044 return 0;