diff options
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r-- | kernel/sched/core.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 5b4b96b27cd7..b9f78f12ac22 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -7296,8 +7296,6 @@ static inline int preempt_count_equals(int preempt_offset) | |||
7296 | 7296 | ||
7297 | void __might_sleep(const char *file, int line, int preempt_offset) | 7297 | void __might_sleep(const char *file, int line, int preempt_offset) |
7298 | { | 7298 | { |
7299 | static unsigned long prev_jiffy; /* ratelimiting */ | ||
7300 | |||
7301 | /* | 7299 | /* |
7302 | * Blocking primitives will set (and therefore destroy) current->state, | 7300 | * Blocking primitives will set (and therefore destroy) current->state, |
7303 | * since we will exit with TASK_RUNNING make sure we enter with it, | 7301 | * since we will exit with TASK_RUNNING make sure we enter with it, |
@@ -7311,6 +7309,14 @@ void __might_sleep(const char *file, int line, int preempt_offset) | |||
7311 | (void *)current->task_state_change)) | 7309 | (void *)current->task_state_change)) |
7312 | __set_current_state(TASK_RUNNING); | 7310 | __set_current_state(TASK_RUNNING); |
7313 | 7311 | ||
7312 | ___might_sleep(file, line, preempt_offset); | ||
7313 | } | ||
7314 | EXPORT_SYMBOL(__might_sleep); | ||
7315 | |||
7316 | void ___might_sleep(const char *file, int line, int preempt_offset) | ||
7317 | { | ||
7318 | static unsigned long prev_jiffy; /* ratelimiting */ | ||
7319 | |||
7314 | rcu_sleep_check(); /* WARN_ON_ONCE() by default, no rate limit reqd. */ | 7320 | rcu_sleep_check(); /* WARN_ON_ONCE() by default, no rate limit reqd. */ |
7315 | if ((preempt_count_equals(preempt_offset) && !irqs_disabled() && | 7321 | if ((preempt_count_equals(preempt_offset) && !irqs_disabled() && |
7316 | !is_idle_task(current)) || | 7322 | !is_idle_task(current)) || |
@@ -7340,7 +7346,7 @@ void __might_sleep(const char *file, int line, int preempt_offset) | |||
7340 | #endif | 7346 | #endif |
7341 | dump_stack(); | 7347 | dump_stack(); |
7342 | } | 7348 | } |
7343 | EXPORT_SYMBOL(__might_sleep); | 7349 | EXPORT_SYMBOL(___might_sleep); |
7344 | #endif | 7350 | #endif |
7345 | 7351 | ||
7346 | #ifdef CONFIG_MAGIC_SYSRQ | 7352 | #ifdef CONFIG_MAGIC_SYSRQ |