diff options
author | Tejun Heo <tj@kernel.org> | 2010-07-02 04:03:51 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-07-02 04:03:51 -0400 |
commit | a1e453d2799760ecf2e09ecd45b80edbe7ff540e (patch) | |
tree | d2f9383f2703c762051a8379872244b1a4ebda2e /kernel | |
parent | 4ce48b37bfedc2bc11e61eae76784887e88b922c (diff) |
workqueue: fix incorrect cpu number BUG_ON() in get_work_gcwq()
get_work_gcwq() was incorrectly triggering BUG_ON() if cpu number is
equal to or higher than num_possible_cpus() instead of nr_cpu_ids.
Fix it.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/workqueue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index b59c946433f..0c485a53809 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -445,7 +445,7 @@ static struct global_cwq *get_work_gcwq(struct work_struct *work) | |||
445 | if (cpu == NR_CPUS) | 445 | if (cpu == NR_CPUS) |
446 | return NULL; | 446 | return NULL; |
447 | 447 | ||
448 | BUG_ON(cpu >= num_possible_cpus()); | 448 | BUG_ON(cpu >= nr_cpu_ids); |
449 | return get_gcwq(cpu); | 449 | return get_gcwq(cpu); |
450 | } | 450 | } |
451 | 451 | ||