Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e18f3ffb9c3ddfc1b4ad8f38f5f2acae8c16f0c9
Commit:     e18f3ffb9c3ddfc1b4ad8f38f5f2acae8c16f0c9
Parent:     a1e3cf418fc1e6b13bdc472ffb60bd02735e41a6
Author:     Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Wed May 9 02:33:50 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed May 9 12:30:50 2007 -0700

    schedule_on_each_cpu(): use preempt_disable()
    
    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 |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index b6fa5e6..1ea4bcb 100644
--- 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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to