diff options
author | Dmitry Adamushko <dmitry.adamushko@gmail.com> | 2008-04-29 03:59:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:04 -0400 |
commit | cbd9b67bd3883dff0ef4b8ec9229d315a9ba38f0 (patch) | |
tree | 38a59233e8ec529980741dac371dcb9587d0a098 /kernel/kthread.c | |
parent | a2d416dcc92e576d0e339efd641bd3d8ee2bfb4d (diff) |
kthread: call wake_up_process() without the lock being held
From the POV of synchronization, there should be no need to call
wake_up_process() with the 'kthread_create_lock' being held.
Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/kthread.c')
-rw-r--r-- | kernel/kthread.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/kthread.c b/kernel/kthread.c index 92cf6930ab51..ac72eea48339 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c | |||
@@ -144,9 +144,9 @@ struct task_struct *kthread_create(int (*threadfn)(void *data), | |||
144 | 144 | ||
145 | spin_lock(&kthread_create_lock); | 145 | spin_lock(&kthread_create_lock); |
146 | list_add_tail(&create.list, &kthread_create_list); | 146 | list_add_tail(&create.list, &kthread_create_list); |
147 | wake_up_process(kthreadd_task); | ||
148 | spin_unlock(&kthread_create_lock); | 147 | spin_unlock(&kthread_create_lock); |
149 | 148 | ||
149 | wake_up_process(kthreadd_task); | ||
150 | wait_for_completion(&create.done); | 150 | wait_for_completion(&create.done); |
151 | 151 | ||
152 | if (!IS_ERR(create.result)) { | 152 | if (!IS_ERR(create.result)) { |