workqueue: gut flush[_delayed]_work_sync()

Now that all workqueues are non-reentrant, flush[_delayed]_work_sync()
are equivalent to flush[_delayed]_work().  Drop the separate
implementation and make them thin wrappers around
flush[_delayed]_work().

* start_flush_work() no longer takes @wait_executing as the only left
  user - flush_work() - always sets it to %true.

* __cancel_work_timer() uses flush_work() instead of wait_on_work().

Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Tejun Heo 2012-08-20 14:51:23 -07:00
parent dbf2576e37
commit 606a5020b9
2 changed files with 22 additions and 114 deletions

View file

@ -412,11 +412,9 @@ extern int keventd_up(void);
int execute_in_process_context(work_func_t fn, struct execute_work *);
extern bool flush_work(struct work_struct *work);
extern bool flush_work_sync(struct work_struct *work);
extern bool cancel_work_sync(struct work_struct *work);
extern bool flush_delayed_work(struct delayed_work *dwork);
extern bool flush_delayed_work_sync(struct delayed_work *work);
extern bool cancel_delayed_work_sync(struct delayed_work *dwork);
extern void workqueue_set_max_active(struct workqueue_struct *wq,
@ -456,6 +454,18 @@ static inline bool __cancel_delayed_work(struct delayed_work *work)
return ret;
}
/* used to be different but now identical to flush_work(), deprecated */
static inline bool flush_work_sync(struct work_struct *work)
{
return flush_work(work);
}
/* used to be different but now identical to flush_delayed_work(), deprecated */
static inline bool flush_delayed_work_sync(struct delayed_work *dwork)
{
return flush_delayed_work(dwork);
}
#ifndef CONFIG_SMP
static inline long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg)
{