Skip to content

Commit

Permalink
Merge branch 'for-4.16-fixes' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/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()
  • Loading branch information
torvalds committed Mar 19, 2018
2 parents 0d707a2 + 6417250 commit c6256ca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion include/linux/workqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ extern int schedule_on_each_cpu(work_func_t func);
int execute_in_process_context(work_func_t fn, struct execute_work *);

extern bool flush_work(struct work_struct *work);
extern bool cancel_work(struct work_struct *work);
extern bool cancel_work_sync(struct work_struct *work);

extern bool flush_delayed_work(struct delayed_work *dwork);
Expand Down
10 changes: 1 addition & 9 deletions kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -3018,14 +3018,6 @@ static bool __cancel_work(struct work_struct *work, bool is_dwork)
return ret;
}

/*
* See cancel_delayed_work()
*/
bool cancel_work(struct work_struct *work)
{
return __cancel_work(work, false);
}

/**
* cancel_delayed_work - cancel a delayed work
* @dwork: delayed_work to cancel
Expand Down Expand Up @@ -5337,7 +5329,7 @@ int workqueue_sysfs_register(struct workqueue_struct *wq)

ret = device_register(&wq_dev->dev);
if (ret) {
kfree(wq_dev);
put_device(&wq_dev->dev);
wq->wq_dev = NULL;
return ret;
}
Expand Down

0 comments on commit c6256ca

Please sign in to comment.