diff options
| author | 2009-09-10 14:33:56 -0500 | |
|---|---|---|
| committer | 2009-09-10 14:33:56 -0500 | |
| commit | a4872d5b6ad69a49975c0268828b5bb2317ea5a0 (patch) | |
| tree | f79577c2731753efb621ef62774949c1e0acdaad /include/linux/workqueue.h | |
| parent | xfs: use correct log reservation when handling ENOSPC in xfs_create (diff) | |
| parent | Linux 2.6.31 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/linux/workqueue.h')
| -rw-r--r-- | include/linux/workqueue.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 13e1adf55c4c..6273fa97b527 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h @@ -240,6 +240,21 @@ static inline int cancel_delayed_work(struct delayed_work *work) return ret; } +/* + * Like above, but uses del_timer() instead of del_timer_sync(). This means, + * if it returns 0 the timer function may be running and the queueing is in + * progress. + */ +static inline int __cancel_delayed_work(struct delayed_work *work) +{ + int ret; + + ret = del_timer(&work->timer); + if (ret) + work_clear_pending(&work->work); + return ret; +} + extern int cancel_delayed_work_sync(struct delayed_work *work); /* Obsolete. use cancel_delayed_work_sync() */ |
