Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365538
b: refs/heads/master
c: b592760
h: refs/heads/master
v: v3
  • Loading branch information
Lai Jiangshan authored and Tejun Heo committed Mar 25, 2013
1 parent ee3274e commit d6bb7eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 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: a357fc03262988f2aa6c4a668b89be22b11ff1e7
refs/heads/master: b5927605478b740d73192f587e458de1632106e8
13 changes: 2 additions & 11 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,9 @@ enum {
*
* PR: wq_pool_mutex protected for writes. Sched-RCU protected for reads.
*
* PW: pwq_lock protected.
*
* WQ: wq->mutex protected.
*
* WR: wq->mutex and pwq_lock protected for writes. Sched-RCU protected
* for reads.
* WR: wq->mutex protected for writes. Sched-RCU protected for reads.
*
* MD: wq_mayday_lock protected.
*/
Expand Down Expand Up @@ -257,7 +254,6 @@ struct workqueue_struct {
static struct kmem_cache *pwq_cache;

static DEFINE_MUTEX(wq_pool_mutex); /* protects pools and workqueues list */
static DEFINE_SPINLOCK(pwq_lock); /* protects pool_workqueues */
static DEFINE_SPINLOCK(wq_mayday_lock); /* protects wq->maydays list */

static LIST_HEAD(workqueues); /* PL: list of all workqueues */
Expand Down Expand Up @@ -300,8 +296,7 @@ static void copy_workqueue_attrs(struct workqueue_attrs *to,

#define assert_rcu_or_wq_mutex(wq) \
rcu_lockdep_assert(rcu_read_lock_sched_held() || \
lockdep_is_held(&wq->mutex) || \
lockdep_is_held(&pwq_lock), \
lockdep_is_held(&wq->mutex), \
"sched RCU or wq->mutex should be held")

#ifdef CONFIG_LOCKDEP
Expand Down Expand Up @@ -3549,9 +3544,7 @@ static void pwq_unbound_release_workfn(struct work_struct *work)
* and consistent with the linking path.
*/
mutex_lock(&wq->mutex);
spin_lock_irq(&pwq_lock);
list_del_rcu(&pwq->pwqs_node);
spin_unlock_irq(&pwq_lock);
mutex_unlock(&wq->mutex);

put_unbound_pool(pool);
Expand Down Expand Up @@ -3635,9 +3628,7 @@ static void init_and_link_pwq(struct pool_workqueue *pwq,
pwq_adjust_max_active(pwq);

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

mutex_unlock(&wq->mutex);
}
Expand Down

0 comments on commit d6bb7eb

Please sign in to comment.