workqueue: clear leftover flags when detached
authorLai Jiangshan <laijs@cn.fujitsu.com>
Tue, 3 Jun 2014 07:32:52 +0000 (15:32 +0800)
committerTejun Heo <tj@kernel.org>
Thu, 19 Jun 2014 16:29:12 +0000 (12:29 -0400)
When a worker is detached, the worker->flags may still have WORKER_UNBOUND
or WORKER_REBOUND, it is OK for all cases:
  1) if it is a normal worker, the worker will be dead, it is OK.
  2) if it is a rescuer, it may re-attach to a pool with this leftover flag[s],
     it is still correct except it may cause unneeded wakeup.

It is correct but not good, so we just remove the leftover flags.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/workqueue.c

Simple merge