Commit 4d103436 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] create_workqueue locking fix

Fix some silliness in there.
parent 15c2165e
...@@ -325,7 +325,7 @@ struct workqueue_struct *__create_workqueue(const char *name, ...@@ -325,7 +325,7 @@ struct workqueue_struct *__create_workqueue(const char *name,
} else { } else {
spin_lock(&workqueue_lock); spin_lock(&workqueue_lock);
list_add(&wq->list, &workqueues); list_add(&wq->list, &workqueues);
spin_unlock_irq(&workqueue_lock); spin_unlock(&workqueue_lock);
for_each_online_cpu(cpu) { for_each_online_cpu(cpu) {
p = create_workqueue_thread(wq, cpu); p = create_workqueue_thread(wq, cpu);
if (p) { if (p) {
...@@ -377,7 +377,7 @@ void destroy_workqueue(struct workqueue_struct *wq) ...@@ -377,7 +377,7 @@ void destroy_workqueue(struct workqueue_struct *wq)
cleanup_workqueue_thread(wq, cpu); cleanup_workqueue_thread(wq, cpu);
spin_lock(&workqueue_lock); spin_lock(&workqueue_lock);
list_del(&wq->list); list_del(&wq->list);
spin_unlock_irq(&workqueue_lock); spin_unlock(&workqueue_lock);
} }
unlock_cpu_hotplug(); unlock_cpu_hotplug();
kfree(wq); kfree(wq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment