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: 071b638689464c6b39407025eedd810d5b5e6f5d

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 <oleg@tv-sign.ru>
Cc: Jarek Poplawski <jarkao2@o2.pl>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Oleg Nesterov and committed by Linus Torvalds 223a10a9 b4652239

+1 -1
+1 -1
include/linux/workqueue.h
··· 160 160 { 161 161 int ret; 162 162 163 - ret = del_timer(&work->timer); 163 + ret = del_timer_sync(&work->timer); 164 164 if (ret) 165 165 work_clear_pending(&work->work); 166 166 return ret;