提交 223a10a9 编写于 作者: O Oleg Nesterov 提交者: Linus Torvalds

revert "cancel_delayed_work: use del_timer() instead of del_timer_sync()"

As pointed out by Jarek Poplawski, the patch

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

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: NOleg Nesterov <oleg@tv-sign.ru>
Cc: Jarek Poplawski <jarkao2@o2.pl>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 b4652239
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册