

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/kernel/sys.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN kernel/sys.c~kexec-ide-spindown-fix kernel/sys.c
--- 25/kernel/sys.c~kexec-ide-spindown-fix	2004-12-03 20:56:48.257423944 -0800
+++ 25-akpm/kernel/sys.c	2004-12-03 20:56:48.262423184 -0800
@@ -444,8 +444,9 @@ asmlinkage long sys_reboot(int magic1, i
 			return -EINVAL;
 		}
 		notifier_call_chain(&reboot_notifier_list, SYS_RESTART, NULL);
-		system_state = SYSTEM_BOOTING;
+		system_state = SYSTEM_RESTART;
 		device_shutdown();
+		system_state = SYSTEM_BOOTING;
 		printk(KERN_EMERG "Starting new kernel\n");
 		machine_shutdown();
 		machine_kexec(image);
_
