aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/kernel.h1
-rw-r--r--kernel/sched.c3
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index d6320a3e8def..b804f694ae6a 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -139,6 +139,7 @@ extern int _cond_resched(void);
139# define might_sleep() \ 139# define might_sleep() \
140 do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0) 140 do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0)
141#else 141#else
142 static inline void __might_sleep(char *file, int line) { }
142# define might_sleep() do { might_resched(); } while (0) 143# define might_sleep() do { might_resched(); } while (0)
143#endif 144#endif
144 145
diff --git a/kernel/sched.c b/kernel/sched.c
index 4d39e96044b9..370a6c31c5e1 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6610,9 +6610,8 @@ static inline int should_resched(void)
6610 6610
6611static void __cond_resched(void) 6611static void __cond_resched(void)
6612{ 6612{
6613#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
6614 __might_sleep(__FILE__, __LINE__); 6613 __might_sleep(__FILE__, __LINE__);
6615#endif 6614
6616 add_preempt_count(PREEMPT_ACTIVE); 6615 add_preempt_count(PREEMPT_ACTIVE);
6617 schedule(); 6616 schedule();
6618 sub_preempt_count(PREEMPT_ACTIVE); 6617 sub_preempt_count(PREEMPT_ACTIVE);