Skip to content

Commit c514068

Browse files
committed
workqueue: Rename __cancel_work_timer() to __cancel_timer_sync()
__cancel_work_timer() is used to implement cancel_work_sync() and cancel_delayed_work_sync(), similarly to how __cancel_work() is used to implement cancel_work() and cancel_delayed_work(). ie. The _timer part of the name is a complete misnomer. The difference from __cancel_work() is the fact that it syncs against work item execution not whether it handles timers or not. Let's rename it to less confusing __cancel_work_sync(). No functional change. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Lai Jiangshan <jiangshanlai@gmail.com>
1 parent d355001 commit c514068

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel/workqueue.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4075,7 +4075,7 @@ static int cwt_wakefn(wait_queue_entry_t *wait, unsigned mode, int sync, void *k
40754075
return autoremove_wake_function(wait, mode, sync, key);
40764076
}
40774077

4078-
static bool __cancel_work_timer(struct work_struct *work, bool is_dwork)
4078+
static bool __cancel_work_sync(struct work_struct *work, bool is_dwork)
40794079
{
40804080
static DECLARE_WAIT_QUEUE_HEAD(cancel_waitq);
40814081
unsigned long flags;
@@ -4159,7 +4159,7 @@ static bool __cancel_work_timer(struct work_struct *work, bool is_dwork)
41594159
*/
41604160
bool cancel_work_sync(struct work_struct *work)
41614161
{
4162-
return __cancel_work_timer(work, false);
4162+
return __cancel_work_sync(work, false);
41634163
}
41644164
EXPORT_SYMBOL_GPL(cancel_work_sync);
41654165

@@ -4264,7 +4264,7 @@ EXPORT_SYMBOL(cancel_delayed_work);
42644264
*/
42654265
bool cancel_delayed_work_sync(struct delayed_work *dwork)
42664266
{
4267-
return __cancel_work_timer(&dwork->work, true);
4267+
return __cancel_work_sync(&dwork->work, true);
42684268
}
42694269
EXPORT_SYMBOL(cancel_delayed_work_sync);
42704270

0 commit comments

Comments
 (0)