From: "Anil" <anil.s.keshavamurthy@intel.com>

We don't need lock_cpu_hotplug()/unlock_cpu_hotplug for singlethreaded
workqueues.

Signed-off-by: Anil Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/kernel/workqueue.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN kernel/workqueue.c~flush_workqueue-locking-simplification kernel/workqueue.c
--- 25/kernel/workqueue.c~flush_workqueue-locking-simplification	2004-06-07 22:12:24.540597056 -0700
+++ 25-akpm/kernel/workqueue.c	2004-06-07 22:12:24.544596448 -0700
@@ -262,7 +262,6 @@ static void flush_cpu_workqueue(struct c
 void fastcall flush_workqueue(struct workqueue_struct *wq)
 {
 	might_sleep();
-	lock_cpu_hotplug();
 
 	if (is_single_threaded(wq)) {
 		/* Always use cpu 0's area. */
@@ -270,11 +269,12 @@ void fastcall flush_workqueue(struct wor
 	} else {
 		int cpu;
 
+		lock_cpu_hotplug();
 		for_each_online_cpu(cpu)
 			flush_cpu_workqueue(wq->cpu_wq + cpu);
+		unlock_cpu_hotplug();
 	}
 
-	unlock_cpu_hotplug();
 }
 
 static struct task_struct *create_workqueue_thread(struct workqueue_struct *wq,
_