Skip to content

Commit c6256ca

Browse files
committed
Merge branch 'for-4.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Pull workqueue fixes from Tejun Heo: "Two low-impact workqueue commits. One fixes workqueue creation error path and the other removes the unused cancel_work()" * 'for-4.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: remove unused cancel_work() workqueue: use put_device() instead of kfree()
2 parents 0d707a2 + 6417250 commit c6256ca

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

include/linux/workqueue.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,6 @@ extern int schedule_on_each_cpu(work_func_t func);
456456
int execute_in_process_context(work_func_t fn, struct execute_work *);
457457

458458
extern bool flush_work(struct work_struct *work);
459-
extern bool cancel_work(struct work_struct *work);
460459
extern bool cancel_work_sync(struct work_struct *work);
461460

462461
extern bool flush_delayed_work(struct delayed_work *dwork);

kernel/workqueue.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3018,14 +3018,6 @@ static bool __cancel_work(struct work_struct *work, bool is_dwork)
30183018
return ret;
30193019
}
30203020

3021-
/*
3022-
* See cancel_delayed_work()
3023-
*/
3024-
bool cancel_work(struct work_struct *work)
3025-
{
3026-
return __cancel_work(work, false);
3027-
}
3028-
30293021
/**
30303022
* cancel_delayed_work - cancel a delayed work
30313023
* @dwork: delayed_work to cancel
@@ -5337,7 +5329,7 @@ int workqueue_sysfs_register(struct workqueue_struct *wq)
53375329

53385330
ret = device_register(&wq_dev->dev);
53395331
if (ret) {
5340-
kfree(wq_dev);
5332+
put_device(&wq_dev->dev);
53415333
wq->wq_dev = NULL;
53425334
return ret;
53435335
}

0 commit comments

Comments
 (0)