Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192486
b: refs/heads/master
c: 4d707b9
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov authored and Tejun Heo committed Apr 30, 2010
1 parent c1833d9 commit 6d46a5d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 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: eef6a7d5c2f38adadab8240fabf43730fe796482
refs/heads/master: 4d707b9f48e2c4aa94b96f1133813b73df71fb55
12 changes: 11 additions & 1 deletion trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,16 @@ static inline void set_wq_data(struct work_struct *work,
atomic_long_set(&work->data, new);
}

/*
* Clear WORK_STRUCT_PENDING and the workqueue on which it was queued.
*/
static inline void clear_wq_data(struct work_struct *work)
{
unsigned long flags = *work_data_bits(work) &
(1UL << WORK_STRUCT_STATIC);
atomic_long_set(&work->data, flags);
}

static inline
struct cpu_workqueue_struct *get_wq_data(struct work_struct *work)
{
Expand Down Expand Up @@ -671,7 +681,7 @@ static int __cancel_work_timer(struct work_struct *work,
wait_on_work(work);
} while (unlikely(ret < 0));

work_clear_pending(work);
clear_wq_data(work);
return ret;
}

Expand Down

0 comments on commit 6d46a5d

Please sign in to comment.