diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-03-21 06:03:10 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-03-21 06:03:10 -0400 |
commit | 3bf2391729822e591dcfbbd1e9dd2f450968cdcb (patch) | |
tree | 80a0499e57a4cc95b6caea559400b5226ebe606f /kernel/workqueue.c | |
parent | 86e213e1d901fbeaf6e57d13c5edd925fadddcbe (diff) | |
parent | fd4a5aef002bb57e8a35ed34d8a878034b9bde94 (diff) |
Merge branch 'perf/urgent' into perf/core
Merge in all pending fixes, before pulling the latest development
bits from Arnaldo - which will involve merge conflicts.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r-- | kernel/workqueue.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 81f2457811eb..55fac5b991b7 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -457,11 +457,12 @@ static int worker_pool_assign_id(struct worker_pool *pool) | |||
457 | int ret; | 457 | int ret; |
458 | 458 | ||
459 | mutex_lock(&worker_pool_idr_mutex); | 459 | mutex_lock(&worker_pool_idr_mutex); |
460 | idr_pre_get(&worker_pool_idr, GFP_KERNEL); | 460 | ret = idr_alloc(&worker_pool_idr, pool, 0, 0, GFP_KERNEL); |
461 | ret = idr_get_new(&worker_pool_idr, pool, &pool->id); | 461 | if (ret >= 0) |
462 | pool->id = ret; | ||
462 | mutex_unlock(&worker_pool_idr_mutex); | 463 | mutex_unlock(&worker_pool_idr_mutex); |
463 | 464 | ||
464 | return ret; | 465 | return ret < 0 ? ret : 0; |
465 | } | 466 | } |
466 | 467 | ||
467 | /* | 468 | /* |