提交 81ddef77 编写于 作者: J James Bottomley 提交者: Linus Torvalds

[PATCH] re-export cancel_rearming_delayed_workqueue

This was unexported by Arjan because we have no current users.

However, during a conversion from tasklets to workqueues of the parisc led
functions, we ran across a case where this was needed.  In particular, the
open coded equivalent of cancel_rearming_delayed_workqueue was implemented
incorrectly, which is, I think, all the evidence necessary that this is a
useful API.
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 9ffb7146
...@@ -71,6 +71,8 @@ extern int keventd_up(void); ...@@ -71,6 +71,8 @@ extern int keventd_up(void);
extern void init_workqueues(void); extern void init_workqueues(void);
void cancel_rearming_delayed_work(struct work_struct *work); void cancel_rearming_delayed_work(struct work_struct *work);
void cancel_rearming_delayed_workqueue(struct workqueue_struct *,
struct work_struct *);
/* /*
* Kill off a pending schedule_delayed_work(). Note that the work callback * Kill off a pending schedule_delayed_work(). Note that the work callback
......
...@@ -429,12 +429,13 @@ void flush_scheduled_work(void) ...@@ -429,12 +429,13 @@ void flush_scheduled_work(void)
* @wq: the controlling workqueue structure * @wq: the controlling workqueue structure
* @work: the delayed work struct * @work: the delayed work struct
*/ */
static void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq,
struct work_struct *work) struct work_struct *work)
{ {
while (!cancel_delayed_work(work)) while (!cancel_delayed_work(work))
flush_workqueue(wq); flush_workqueue(wq);
} }
EXPORT_SYMBOL(cancel_rearming_delayed_workqueue);
/** /**
* cancel_rearming_delayed_work - reliably kill off a delayed keventd * cancel_rearming_delayed_work - reliably kill off a delayed keventd
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册