- Fix up is_single_threaded() handling - single-threaded wq thread does not have "/0" appended. --- 25-akpm/kernel/workqueue.c | 10 +++++++--- include/linux/workqueue.h | 0 2 files changed, 7 insertions(+), 3 deletions(-) diff -puN include/linux/workqueue.h~create_singlethread_workqueue-fix include/linux/workqueue.h diff -puN kernel/workqueue.c~create_singlethread_workqueue-fix kernel/workqueue.c --- 25/kernel/workqueue.c~create_singlethread_workqueue-fix 2004-04-18 23:32:36.354170912 -0700 +++ 25-akpm/kernel/workqueue.c 2004-04-18 23:33:13.611506936 -0700 @@ -244,8 +244,9 @@ void fastcall flush_workqueue(struct wor long sequence_needed; if (is_single_threaded(wq)) - cpu = 0; - cwq = wq->cpu_wq + cpu; + cwq = wq->cpu_wq + 0; /* Always use cpu 0's area. */ + else + cwq = wq->cpu_wq + cpu; if (cwq->thread == current) { /* @@ -286,7 +287,10 @@ static struct task_struct *create_workqu init_waitqueue_head(&cwq->more_work); init_waitqueue_head(&cwq->work_done); - p = kthread_create(worker_thread, cwq, "%s/%d", wq->name, cpu); + if (is_single_threaded(wq)) + p = kthread_create(worker_thread, cwq, "%s", wq->name); + else + p = kthread_create(worker_thread, cwq, "%s/%d", wq->name, cpu); if (IS_ERR(p)) return NULL; cwq->thread = p; _