Skip to content

Commit

Permalink
revert "cancel_delayed_work: use del_timer() instead of del_timer_syn…
Browse files Browse the repository at this point in the history
…c()"

As pointed out by Jarek Poplawski, the patch

	[WORKQUEUE]: cancel_delayed_work: use del_timer() instead of del_timer_sync()
	commit: 071b638

was wrong, it was merged by mistake after that.

From the changelog:

	after this patch:
		...
		delayed_work_timer_fn->__queue_work() in progress.

		The latter doesn't differ from the caller's POV,

it does make a difference if the caller calls flush_workqueue() after
cancel_delayed_work(), in that case flush_workqueue() can miss this
work_struct.

Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Jarek Poplawski <[email protected]>
Cc: David Howells <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed May 18, 2007
1 parent b465223 commit 223a10a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/workqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ static inline int cancel_delayed_work(struct delayed_work *work)
{
int ret;

ret = del_timer(&work->timer);
ret = del_timer_sync(&work->timer);
if (ret)
work_clear_pending(&work->work);
return ret;
Expand Down

0 comments on commit 223a10a

Please sign in to comment.