aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/workqueue.h2
-rw-r--r--kernel/workqueue.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index ff46f537ba9b..ac39d04d027c 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -71,6 +71,8 @@ extern int keventd_up(void);
71 71
72extern void init_workqueues(void); 72extern void init_workqueues(void);
73void cancel_rearming_delayed_work(struct work_struct *work); 73void cancel_rearming_delayed_work(struct work_struct *work);
74void cancel_rearming_delayed_workqueue(struct workqueue_struct *,
75 struct work_struct *);
74 76
75/* 77/*
76 * Kill off a pending schedule_delayed_work(). Note that the work callback 78 * Kill off a pending schedule_delayed_work(). Note that the work callback
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 52ef419d2747..259cf55da3c9 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -429,12 +429,13 @@ void flush_scheduled_work(void)
429 * @wq: the controlling workqueue structure 429 * @wq: the controlling workqueue structure
430 * @work: the delayed work struct 430 * @work: the delayed work struct
431 */ 431 */
432static void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, 432void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq,
433 struct work_struct *work) 433 struct work_struct *work)
434{ 434{
435 while (!cancel_delayed_work(work)) 435 while (!cancel_delayed_work(work))
436 flush_workqueue(wq); 436 flush_workqueue(wq);
437} 437}
438EXPORT_SYMBOL(cancel_rearming_delayed_workqueue);
438 439
439/** 440/**
440 * cancel_rearming_delayed_work - reliably kill off a delayed keventd 441 * cancel_rearming_delayed_work - reliably kill off a delayed keventd