Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350293
b: refs/heads/master
c: 038366c
h: refs/heads/master
i:
  350291: d851e31
v: v3
  • Loading branch information
Lai Jiangshan authored and Tejun Heo committed Feb 7, 2013
1 parent 43164eb commit 8398f82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 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: 6be195886ac26abe0194ed1bc7a9224f8a97c310
refs/heads/master: 038366c5cf23ae737b9f72169dd8ade2d105755b
16 changes: 6 additions & 10 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -3443,8 +3443,6 @@ EXPORT_SYMBOL_GPL(workqueue_congested);
* Test whether @work is currently pending or running. There is no
* synchronization around this function and the test result is
* unreliable and only useful as advisory hints or for debugging.
* Especially for reentrant wqs, the pending state might hide the
* running state.
*
* RETURNS:
* OR'd bitmask of WORK_BUSY_* bits.
Expand All @@ -3455,17 +3453,15 @@ unsigned int work_busy(struct work_struct *work)
unsigned long flags;
unsigned int ret = 0;

if (!pool)
return 0;

spin_lock_irqsave(&pool->lock, flags);

if (work_pending(work))
ret |= WORK_BUSY_PENDING;
if (find_worker_executing_work(pool, work))
ret |= WORK_BUSY_RUNNING;

spin_unlock_irqrestore(&pool->lock, flags);
if (pool) {
spin_lock_irqsave(&pool->lock, flags);
if (find_worker_executing_work(pool, work))
ret |= WORK_BUSY_RUNNING;
spin_unlock_irqrestore(&pool->lock, flags);
}

return ret;
}
Expand Down

0 comments on commit 8398f82

Please sign in to comment.