From: Andrew Morton Cc: Cedric Le Goater Cc: Li Zefan Signed-off-by: Andrew Morton --- include/linux/freezer.h | 5 ----- kernel/freezer.c | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 15 deletions(-) diff -puN include/linux/freezer.h~freezer_cg-use-thaw_process-in-unfreeze_cgroup-fix include/linux/freezer.h --- a/include/linux/freezer.h~freezer_cg-use-thaw_process-in-unfreeze_cgroup-fix +++ a/include/linux/freezer.h @@ -44,11 +44,6 @@ static inline bool should_send_signal(st return !(p->flags & PF_FREEZER_NOSIG); } -/* - * Wake up a frozen process - */ -extern int __thaw_process(struct task_struct *p); - /* Takes and releases task alloc lock using task_lock() */ extern int thaw_process(struct task_struct *p); diff -puN kernel/freezer.c~freezer_cg-use-thaw_process-in-unfreeze_cgroup-fix kernel/freezer.c --- a/kernel/freezer.c~freezer_cg-use-thaw_process-in-unfreeze_cgroup-fix +++ a/kernel/freezer.c @@ -121,16 +121,7 @@ void cancel_freezing(struct task_struct } } -/* - * Wake up a frozen process - * - * task_lock() is needed to prevent the race with refrigerator() which may - * occur if the freezing of tasks fails. Namely, without the lock, if the - * freezing of tasks failed, thaw_tasks() might have run before a task in - * refrigerator() could call frozen_process(), in which case the task would be - * frozen and no one would thaw it. - */ -int __thaw_process(struct task_struct *p) +static int __thaw_process(struct task_struct *p) { if (frozen(p)) { p->flags &= ~PF_FROZEN; @@ -140,6 +131,15 @@ int __thaw_process(struct task_struct *p return 0; } +/* + * Wake up a frozen process + * + * task_lock() is needed to prevent the race with refrigerator() which may + * occur if the freezing of tasks fails. Namely, without the lock, if the + * freezing of tasks failed, thaw_tasks() might have run before a task in + * refrigerator() could call frozen_process(), in which case the task would be + * frozen and no one would thaw it. + */ int thaw_process(struct task_struct *p) { task_lock(p); _