Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105951
b: refs/heads/master
c: a67da70
h: refs/heads/master
i:
  105949: b24b6a8
  105947: 98e7a69
  105943: f7deec4
  105935: 35f0841
  105919: 5a10c77
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Jul 25, 2008
1 parent 9fb554e commit 2bacdf3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 69b895fd13d73aebf62b75502eb6513d43057ba3
refs/heads/master: a67da70dc0955580665f5444f318b92e69a3c272
5 changes: 5 additions & 0 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,8 @@ EXPORT_SYMBOL_GPL(flush_workqueue);
* flush_work - block until a work_struct's callback has terminated
* @work: the work which is to be flushed
*
* Returns false if @work has already terminated.
*
* It is expected that, prior to calling flush_work(), the caller has
* arranged for the work to not be requeued, otherwise it doesn't make
* sense to use this function.
Expand All @@ -442,6 +444,9 @@ int flush_work(struct work_struct *work)
if (!cwq)
return 0;

lock_acquire(&cwq->wq->lockdep_map, 0, 0, 0, 2, _THIS_IP_);
lock_release(&cwq->wq->lockdep_map, 1, _THIS_IP_);

prev = NULL;
spin_lock_irq(&cwq->lock);
if (!list_empty(&work->entry)) {
Expand Down

0 comments on commit 2bacdf3

Please sign in to comment.