diff options
author | Dan Magenheimer <dan.magenheimer@oracle.com> | 2012-10-18 16:31:37 -0700 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-10-24 12:38:16 -0700 |
commit | c0158ca64da5732dfb86a3f28944e9626776692f (patch) | |
tree | 2ce9ff8057b9273905424b2932b35a080cfdbf38 /COPYING | |
parent | ddffeb8c4d0331609ef2581d84de4d763607bd37 (diff) |
workqueue: cancel_delayed_work() should return %false if work item is idle
57b30ae77b ("workqueue: reimplement cancel_delayed_work() using
try_to_grab_pending()") made cancel_delayed_work() always return %true
unless someone else is also trying to cancel the work item, which is
broken - if the target work item is idle, the return value should be
%false.
try_to_grab_pending() indicates that the target work item was idle by
zero return value. Use it for return. Note that this brings
cancel_delayed_work() in line with __cancel_work_timer() in return
value handling.
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
LKML-Reference: <444a6439-b1a4-4740-9e7e-bc37267cfe73@default>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions