Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365512
b: refs/heads/master
c: 983ca25
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo committed Mar 13, 2013
1 parent f519f4b commit bc12441
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 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: 699ce097efe8f45bc5c055e4f12cb1e271c270d9
refs/heads/master: 983ca25e738ee0c9c5435a503a6bb0034d4552b0
14 changes: 9 additions & 5 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -3771,21 +3771,25 @@ static void init_and_link_pwq(struct pool_workqueue *pwq,
pwq->wq = wq;
pwq->flush_color = -1;
pwq->refcnt = 1;
pwq->max_active = wq->saved_max_active;
INIT_LIST_HEAD(&pwq->delayed_works);
INIT_LIST_HEAD(&pwq->mayday_node);
INIT_WORK(&pwq->unbound_release_work, pwq_unbound_release_workfn);

/*
* Link @pwq and set the matching work_color. This is synchronized
* with flush_mutex to avoid confusing flush_workqueue().
*/
mutex_lock(&wq->flush_mutex);
spin_lock_irq(&workqueue_lock);

/*
* Set the matching work_color. This is synchronized with
* flush_mutex to avoid confusing flush_workqueue().
*/
if (p_last_pwq)
*p_last_pwq = first_pwq(wq);
pwq->work_color = wq->work_color;

/* sync max_active to the current setting */
pwq_adjust_max_active(pwq);

/* link in @pwq */
list_add_rcu(&pwq->pwqs_node, &wq->pwqs);

spin_unlock_irq(&workqueue_lock);
Expand Down

0 comments on commit bc12441

Please sign in to comment.