work_busy() was available for regular work only, however it is useful for delayed work too.
This implements a variant of work_busy() for delayed work. CC: [email protected] Signed-off-by: Alex Naidis <[email protected]> --- include/linux/workqueue.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index c102ef6..b7ae6ac 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h @@ -603,6 +603,15 @@ static inline bool schedule_delayed_work(struct delayed_work *dwork, return queue_delayed_work(system_wq, dwork, delay); } +/** + * delayed_work_busy - See work_busy() + * @work: the delayed work to be tested + */ +static inline unsigned int delayed_work_busy(struct delayed_work *dwork) +{ + return work_busy(&dwork->work); +} + #ifndef CONFIG_SMP static inline long work_on_cpu(int cpu, long (*fn)(void *), void *arg) { -- 2.7.4

