Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

James Bottomley and committed by
Linus Torvalds
81ddef77 9ffb7146

+5 -2
+2
include/linux/workqueue.h
··· 71 71 72 72 extern void init_workqueues(void); 73 73 void cancel_rearming_delayed_work(struct work_struct *work); 74 + void cancel_rearming_delayed_workqueue(struct workqueue_struct *, 75 + struct work_struct *); 74 76 75 77 /* 76 78 * Kill off a pending schedule_delayed_work(). Note that the work callback
+3 -2
kernel/workqueue.c
··· 429 429 * @wq: the controlling workqueue structure 430 430 * @work: the delayed work struct 431 431 */ 432 - static void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, 433 - struct work_struct *work) 432 + void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, 433 + struct work_struct *work) 434 434 { 435 435 while (!cancel_delayed_work(work)) 436 436 flush_workqueue(wq); 437 437 } 438 + EXPORT_SYMBOL(cancel_rearming_delayed_workqueue); 438 439 439 440 /** 440 441 * cancel_rearming_delayed_work - reliably kill off a delayed keventd