Skip to content

Commit

Permalink
[PATCH] re-export cancel_rearming_delayed_workqueue
Browse files Browse the repository at this point in the history
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 <James.Bottomley@SteelEye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
James Bottomley authored and Linus Torvalds committed Apr 16, 2005
1 parent 9ffb714 commit 81ddef7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions include/linux/workqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 81ddef7

Please sign in to comment.