sched: Remove preempt_offset argument from __might_sleep()
All callers hand in 0 and never will hand in anything else. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20210923165358.054321586@linutronix.de
This commit is contained in:
parent
7b5ff4bb9a
commit
42a387566c
@ -112,7 +112,7 @@ static __always_inline void might_resched(void)
|
|||||||
|
|
||||||
#ifdef CONFIG_DEBUG_ATOMIC_SLEEP
|
#ifdef CONFIG_DEBUG_ATOMIC_SLEEP
|
||||||
extern void __might_resched(const char *file, int line, int preempt_offset);
|
extern void __might_resched(const char *file, int line, int preempt_offset);
|
||||||
extern void __might_sleep(const char *file, int line, int preempt_offset);
|
extern void __might_sleep(const char *file, int line);
|
||||||
extern void __cant_sleep(const char *file, int line, int preempt_offset);
|
extern void __cant_sleep(const char *file, int line, int preempt_offset);
|
||||||
extern void __cant_migrate(const char *file, int line);
|
extern void __cant_migrate(const char *file, int line);
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ extern void __cant_migrate(const char *file, int line);
|
|||||||
* supposed to.
|
* supposed to.
|
||||||
*/
|
*/
|
||||||
# define might_sleep() \
|
# define might_sleep() \
|
||||||
do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0)
|
do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0)
|
||||||
/**
|
/**
|
||||||
* cant_sleep - annotation for functions that cannot sleep
|
* cant_sleep - annotation for functions that cannot sleep
|
||||||
*
|
*
|
||||||
@ -170,8 +170,7 @@ extern void __cant_migrate(const char *file, int line);
|
|||||||
#else
|
#else
|
||||||
static inline void __might_resched(const char *file, int line,
|
static inline void __might_resched(const char *file, int line,
|
||||||
int preempt_offset) { }
|
int preempt_offset) { }
|
||||||
static inline void __might_sleep(const char *file, int line,
|
static inline void __might_sleep(const char *file, int line) { }
|
||||||
int preempt_offset) { }
|
|
||||||
# define might_sleep() do { might_resched(); } while (0)
|
# define might_sleep() do { might_resched(); } while (0)
|
||||||
# define cant_sleep() do { } while (0)
|
# define cant_sleep() do { } while (0)
|
||||||
# define cant_migrate() do { } while (0)
|
# define cant_migrate() do { } while (0)
|
||||||
|
@ -9475,7 +9475,7 @@ static inline int preempt_count_equals(int preempt_offset)
|
|||||||
return (nested == preempt_offset);
|
return (nested == preempt_offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __might_sleep(const char *file, int line, int preempt_offset)
|
void __might_sleep(const char *file, int line)
|
||||||
{
|
{
|
||||||
unsigned int state = get_current_state();
|
unsigned int state = get_current_state();
|
||||||
/*
|
/*
|
||||||
@ -9489,7 +9489,7 @@ void __might_sleep(const char *file, int line, int preempt_offset)
|
|||||||
(void *)current->task_state_change,
|
(void *)current->task_state_change,
|
||||||
(void *)current->task_state_change);
|
(void *)current->task_state_change);
|
||||||
|
|
||||||
__might_resched(file, line, preempt_offset);
|
__might_resched(file, line, 0);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(__might_sleep);
|
EXPORT_SYMBOL(__might_sleep);
|
||||||
|
|
||||||
|
@ -5255,7 +5255,7 @@ void __might_fault(const char *file, int line)
|
|||||||
return;
|
return;
|
||||||
if (pagefault_disabled())
|
if (pagefault_disabled())
|
||||||
return;
|
return;
|
||||||
__might_sleep(file, line, 0);
|
__might_sleep(file, line);
|
||||||
#if defined(CONFIG_DEBUG_ATOMIC_SLEEP)
|
#if defined(CONFIG_DEBUG_ATOMIC_SLEEP)
|
||||||
if (current->mm)
|
if (current->mm)
|
||||||
might_lock_read(¤t->mm->mmap_lock);
|
might_lock_read(¤t->mm->mmap_lock);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user