Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361287
b: refs/heads/master
c: e68035f
h: refs/heads/master
i:
  361285: 09bd6cb
  361283: 4f90062
  361279: 69f1184
v: v3
  • Loading branch information
Tejun Heo authored and Linus Torvalds committed Mar 13, 2013
1 parent ab00d75 commit 4362529
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ebd6c70714f5eda9cd1b60d23754ffd1d62481f6
refs/heads/master: e68035fb65dec05718d765fbea14d2e527214ff6
7 changes: 4 additions & 3 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/*
Expand Down

0 comments on commit 4362529

Please sign in to comment.