mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 22:23:14 -04:00
kernel: rename is_single_threaded(task) to current_is_single_threaded(void)
- is_single_threaded(task) is not safe unless task == current, we can't use task->signal or task->mm. - it doesn't make sense unless task == current, the task can fork right after the check. Rename it to current_is_single_threaded() and kill the argument. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
parent
d2e3ee9b29
commit
5bb459bb45
4 changed files with 5 additions and 4 deletions
|
|
@ -2075,7 +2075,7 @@ static inline unsigned long wait_task_inactive(struct task_struct *p,
|
|||
#define for_each_process(p) \
|
||||
for (p = &init_task ; (p = next_task(p)) != &init_task ; )
|
||||
|
||||
extern bool is_single_threaded(struct task_struct *);
|
||||
extern bool current_is_single_threaded(void);
|
||||
|
||||
/*
|
||||
* Careful: do_each_thread/while_each_thread is a double loop so
|
||||
|
|
|
|||
Loading…
Reference in a new issue