diff --git a/[refs] b/[refs] index 8385f5cc4691..9d48e9a73482 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 37d0892c5a94e208cf863e3b7bac014edee4346d +refs/heads/master: 4e49627b9bc29a14b393c480e8c979e3bc922ef7 diff --git a/trunk/include/linux/workqueue.h b/trunk/include/linux/workqueue.h index 13e1adf55c4c..6273fa97b527 100644 --- a/trunk/include/linux/workqueue.h +++ b/trunk/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() */