projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1e3cf4
)
schedule_on_each_cpu(): use preempt_disable()
author
Andrew Morton
<
[email protected]
>
Wed, 9 May 2007 09:33:50 +0000
(
02:33
-0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 9 May 2007 19:30:50 +0000
(12:30 -0700)
We take workqueue_mutex in there to keep CPU hotplug away. But
preempt_disable() will suffice for that.
Cc: Ingo Molnar <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
kernel/workqueue.c
patch
|
blob
|
history
diff --git
a/kernel/workqueue.c
b/kernel/workqueue.c
index b6fa5e63085d65b42f46fe97735751b6f402cab4..1ea4bcb86974fb94acf70d5bd9c2ec45dcf08782 100644
(file)
--- a/
kernel/workqueue.c
+++ b/
kernel/workqueue.c
@@
-638,7
+638,7
@@
int schedule_on_each_cpu(work_func_t func)
if (!works)
return -ENOMEM;
- mutex_lock(&workqueue_mutex);
+ preempt_disable(); /* CPU hotplug */
for_each_online_cpu(cpu) {
struct work_struct *work = per_cpu_ptr(works, cpu);
@@
-646,7
+646,7
@@
int schedule_on_each_cpu(work_func_t func)
set_bit(WORK_STRUCT_PENDING, work_data_bits(work));
__queue_work(per_cpu_ptr(keventd_wq->cpu_wq, cpu), work);
}
-
mutex_unlock(&workqueue_mutex
);
+
preempt_enable(
);
flush_workqueue(keventd_wq);
free_percpu(works);
return 0;