Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365531
b: refs/heads/master
c: 8810945
h: refs/heads/master
i:
  365529: efdca87
  365527: 96dfe00
v: v3
  • Loading branch information
Lai Jiangshan authored and Tejun Heo committed Mar 20, 2013
1 parent bc9b9df commit 12186d2
Show file tree
Hide file tree
Showing 2 changed files with 6 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: 951a078a5285ad31bc22e190616ad54b78fac992
refs/heads/master: 881094532e2a27406a5f06f839087bd152a8a494
10 changes: 5 additions & 5 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -3962,15 +3962,15 @@ bool workqueue_congested(int cpu, struct workqueue_struct *wq)
struct pool_workqueue *pwq;
bool ret;

preempt_disable();
rcu_read_lock_sched();

if (!(wq->flags & WQ_UNBOUND))
pwq = per_cpu_ptr(wq->cpu_pwqs, cpu);
else
pwq = first_pwq(wq);

ret = !list_empty(&pwq->delayed_works);
preempt_enable();
rcu_read_unlock_sched();

return ret;
}
Expand Down Expand Up @@ -4354,16 +4354,16 @@ bool freeze_workqueues_busy(void)
* nr_active is monotonically decreasing. It's safe
* to peek without lock.
*/
preempt_disable();
rcu_read_lock_sched();
for_each_pwq(pwq, wq) {
WARN_ON_ONCE(pwq->nr_active < 0);
if (pwq->nr_active) {
busy = true;
preempt_enable();
rcu_read_unlock_sched();
goto out_unlock;
}
}
preempt_enable();
rcu_read_unlock_sched();
}
out_unlock:
mutex_unlock(&wq_mutex);
Expand Down

0 comments on commit 12186d2

Please sign in to comment.