diff options
| author | Akinobu Mita <akinobu.mita@gmail.com> | 2010-10-26 17:22:45 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 19:52:15 -0400 |
| commit | 4ce6494dbd8909718840bb88d5a699ef6ce5c212 (patch) | |
| tree | 7803fc3f194969a736ae3a12b51e2cada7b98fbd | |
| parent | ca51c5a76345b28c6f1b742f9f5f0a6fc9afd9ca (diff) | |
stop_machine: convert cpu notifier to return encapsulate errno value
In commit e6bde73b07edeb703d4c89c1daabc09c303de11f ("cpu-hotplug: return
better errno on cpu hotplug failure"), the cpu notifier can return an
encapsulated errno value.
This converts the cpu notifier to return an encapsulated errno value for
stop_machine().
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| -rw-r--r-- | kernel/stop_machine.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c index 3cb4a9a8ae1c..2df820b03beb 100644 --- a/kernel/stop_machine.c +++ b/kernel/stop_machine.c | |||
| @@ -304,7 +304,7 @@ static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb, | |||
| 304 | p = kthread_create(cpu_stopper_thread, stopper, "migration/%d", | 304 | p = kthread_create(cpu_stopper_thread, stopper, "migration/%d", |
| 305 | cpu); | 305 | cpu); |
| 306 | if (IS_ERR(p)) | 306 | if (IS_ERR(p)) |
| 307 | return NOTIFY_BAD; | 307 | return notifier_from_errno(PTR_ERR(p)); |
| 308 | get_task_struct(p); | 308 | get_task_struct(p); |
| 309 | kthread_bind(p, cpu); | 309 | kthread_bind(p, cpu); |
| 310 | sched_set_stop_task(cpu, p); | 310 | sched_set_stop_task(cpu, p); |
| @@ -372,7 +372,7 @@ static int __init cpu_stop_init(void) | |||
| 372 | /* start one for the boot cpu */ | 372 | /* start one for the boot cpu */ |
| 373 | err = cpu_stop_cpu_callback(&cpu_stop_cpu_notifier, CPU_UP_PREPARE, | 373 | err = cpu_stop_cpu_callback(&cpu_stop_cpu_notifier, CPU_UP_PREPARE, |
| 374 | bcpu); | 374 | bcpu); |
| 375 | BUG_ON(err == NOTIFY_BAD); | 375 | BUG_ON(err != NOTIFY_OK); |
| 376 | cpu_stop_cpu_callback(&cpu_stop_cpu_notifier, CPU_ONLINE, bcpu); | 376 | cpu_stop_cpu_callback(&cpu_stop_cpu_notifier, CPU_ONLINE, bcpu); |
| 377 | register_cpu_notifier(&cpu_stop_cpu_notifier); | 377 | register_cpu_notifier(&cpu_stop_cpu_notifier); |
| 378 | 378 | ||
