summaryrefslogtreecommitdiff
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-03-21 11:03:10 +0100
committerIngo Molnar <mingo@kernel.org>2013-03-21 11:03:10 +0100
commit3bf2391729822e591dcfbbd1e9dd2f450968cdcb (patch)
tree80a0499e57a4cc95b6caea559400b5226ebe606f /kernel/workqueue.c
parent86e213e1d901fbeaf6e57d13c5edd925fadddcbe (diff)
parentfd4a5aef002bb57e8a35ed34d8a878034b9bde94 (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.c7
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)
int ret;
mutex_lock(&worker_pool_idr_mutex);
- idr_pre_get(&worker_pool_idr, GFP_KERNEL);
- ret = idr_get_new(&worker_pool_idr, pool, &pool->id);
+ ret = idr_alloc(&worker_pool_idr, pool, 0, 0, GFP_KERNEL);
+ if (ret >= 0)
+ pool->id = ret;
mutex_unlock(&worker_pool_idr_mutex);
- return ret;
+ return ret < 0 ? ret : 0;
}
/*