projects/linux·commit 81ddef77

[PATCH] re-export cancel_rearming_delayed_workqueue

81ddef77 · James Bottomley <[email protected]> · 2005-04-16 15:23:59 -07:00

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: James Bottomley <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
81ddef77bb774e771db8588b937665cd38f40cee
Parents
9ffb7146

Changes

2 files changed · +5 −2

FileStatusAddDelContent
include/linux/workqueue.hmodified+2−0View file
kernel/workqueue.cmodified+3−2View file

include/linux/workqueue.h

View file
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index ff46f53..ac39d04 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -71,6 +71,8 @@ extern int keventd_up(void);
extern void init_workqueues(void);
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

kernel/workqueue.c

View file
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 52ef419..259cf55 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -429,12 +429,13 @@ void flush_scheduled_work(void)
* @wq: the controlling workqueue structure
* @work: the delayed work struct
*/
-static void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq,
- struct work_struct *work)
+void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq,
+ struct work_struct *work)
{
while (!cancel_delayed_work(work))
flush_workqueue(wq);
}
+EXPORT_SYMBOL(cancel_rearming_delayed_workqueue);
/**
* cancel_rearming_delayed_work - reliably kill off a delayed keventd