Commit 726162b5dad154a90dad51c0185b891312de5757
Committed by
Linus Torvalds
1 parent
0709db6072
Exists in
master
and in
7 other branches
freezer: remove PF_NOFREEZE from handle_initrd
Make handle_initrd() call try_to_freeze() in a suitable place instead of setting PF_NOFREEZE for the current task. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Nigel Cunningham <nigel@nigel.suspend2.net> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff
init/do_mounts_initrd.c
... | ... | @@ -55,11 +55,12 @@ |
55 | 55 | sys_mount(".", "/", NULL, MS_MOVE, NULL); |
56 | 56 | sys_chroot("."); |
57 | 57 | |
58 | - current->flags |= PF_NOFREEZE; | |
59 | 58 | pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD); |
60 | 59 | if (pid > 0) { |
61 | - while (pid != sys_wait4(-1, NULL, 0, NULL)) | |
60 | + while (pid != sys_wait4(-1, NULL, 0, NULL)) { | |
61 | + try_to_freeze(); | |
62 | 62 | yield(); |
63 | + } | |
63 | 64 | } |
64 | 65 | |
65 | 66 | /* move initrd to rootfs' /old */ |