Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105954
b: refs/heads/master
c: 8448502
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Jul 25, 2008
1 parent 496fad2 commit c9210f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8de6d308bab4f67fcf953562f9f08f9527cad72d
refs/heads/master: 8448502cfc915f70e3f8923849ade27d472044cb
9 changes: 6 additions & 3 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -911,14 +911,15 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb,
unsigned int cpu = (unsigned long)hcpu;
struct cpu_workqueue_struct *cwq;
struct workqueue_struct *wq;
int ret = NOTIFY_OK;

action &= ~CPU_TASKS_FROZEN;

switch (action) {
case CPU_UP_PREPARE:
cpu_set(cpu, cpu_populated_map);
}

undo:
list_for_each_entry(wq, &workqueues, list) {
cwq = per_cpu_ptr(wq->cpu_wq, cpu);

Expand All @@ -928,7 +929,9 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb,
break;
printk(KERN_ERR "workqueue [%s] for %i failed\n",
wq->name, cpu);
return NOTIFY_BAD;
action = CPU_UP_CANCELED;
ret = NOTIFY_BAD;
goto undo;

case CPU_ONLINE:
start_workqueue_thread(cwq, cpu);
Expand All @@ -948,7 +951,7 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb,
cpu_clear(cpu, cpu_populated_map);
}

return NOTIFY_OK;
return ret;
}

void __init init_workqueues(void)
Expand Down

0 comments on commit c9210f0

Please sign in to comment.