diff options
-rw-r--r-- | include/linux/reboot.h | 1 | ||||
-rw-r--r-- | kernel/kexec.c | 6 | ||||
-rw-r--r-- | kernel/sys.c | 2 |
3 files changed, 3 insertions, 6 deletions
diff --git a/include/linux/reboot.h b/include/linux/reboot.h index b93b541cf111..988e55fe649b 100644 --- a/include/linux/reboot.h +++ b/include/linux/reboot.h | |||
@@ -59,6 +59,7 @@ extern void machine_crash_shutdown(struct pt_regs *); | |||
59 | * Architecture independent implemenations of sys_reboot commands. | 59 | * Architecture independent implemenations of sys_reboot commands. |
60 | */ | 60 | */ |
61 | 61 | ||
62 | extern void kernel_restart_prepare(char *cmd); | ||
62 | extern void kernel_restart(char *cmd); | 63 | extern void kernel_restart(char *cmd); |
63 | extern void kernel_halt(void); | 64 | extern void kernel_halt(void); |
64 | extern void kernel_power_off(void); | 65 | extern void kernel_power_off(void); |
diff --git a/kernel/kexec.c b/kernel/kexec.c index 2810558802b6..b81682312dc4 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c | |||
@@ -1472,11 +1472,7 @@ int kernel_kexec(void) | |||
1472 | } else | 1472 | } else |
1473 | #endif | 1473 | #endif |
1474 | { | 1474 | { |
1475 | blocking_notifier_call_chain(&reboot_notifier_list, | 1475 | kernel_restart_prepare(NULL); |
1476 | SYS_RESTART, NULL); | ||
1477 | system_state = SYSTEM_RESTART; | ||
1478 | device_shutdown(); | ||
1479 | sysdev_shutdown(); | ||
1480 | printk(KERN_EMERG "Starting new kernel\n"); | 1476 | printk(KERN_EMERG "Starting new kernel\n"); |
1481 | machine_shutdown(); | 1477 | machine_shutdown(); |
1482 | } | 1478 | } |
diff --git a/kernel/sys.c b/kernel/sys.c index c01858090a98..3dacb00a7f76 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -274,7 +274,7 @@ void emergency_restart(void) | |||
274 | } | 274 | } |
275 | EXPORT_SYMBOL_GPL(emergency_restart); | 275 | EXPORT_SYMBOL_GPL(emergency_restart); |
276 | 276 | ||
277 | static void kernel_restart_prepare(char *cmd) | 277 | void kernel_restart_prepare(char *cmd) |
278 | { | 278 | { |
279 | blocking_notifier_call_chain(&reboot_notifier_list, SYS_RESTART, cmd); | 279 | blocking_notifier_call_chain(&reboot_notifier_list, SYS_RESTART, cmd); |
280 | system_state = SYSTEM_RESTART; | 280 | system_state = SYSTEM_RESTART; |