Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 726162b5 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Linus Torvalds
Browse files

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: default avatarRafael J. Wysocki <rjw@sisk.pl>
Acked-by: default avatarNigel Cunningham <nigel@nigel.suspend2.net>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0709db60
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -55,12 +55,13 @@ static void __init handle_initrd(void)
	sys_mount(".", "/", NULL, MS_MOVE, NULL);
	sys_chroot(".");

	current->flags |= PF_NOFREEZE;
	pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
	if (pid > 0) {
		while (pid != sys_wait4(-1, NULL, 0, NULL))
		while (pid != sys_wait4(-1, NULL, 0, NULL)) {
			try_to_freeze();
			yield();
		}
	}

	/* move initrd to rootfs' /old */
	sys_fchdir(old_fd);