Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • kernel
  • workqueue.c
Find file BlameHistoryPermalink
  • Dan Magenheimer's avatar
    workqueue: cancel_delayed_work() should return %false if work item is idle · c0158ca6
    Dan Magenheimer authored Oct 18, 2012
    57b30ae7
    
     ("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: default avatarDan Magenheimer <dan.magenheimer@oracle.com>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    LKML-Reference: <444a6439-b1a4-4740-9e7e-bc37267cfe73@default>
    c0158ca6
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7