workqueue: use "pool->cpu < 0" to stand for an unbound pool
authorLai Jiangshan <laijs@cn.fujitsu.com>
Tue, 3 Jun 2014 07:31:45 +0000 (15:31 +0800)
committerTejun Heo <tj@kernel.org>
Thu, 19 Jun 2014 16:05:00 +0000 (12:05 -0400)
commit61d0fbb4b6f707d57555c9dc6d8a69144e0e8641
treee0f00c368eb7330ac80c1a2854dad7462a5883cb
parentebe06187bf2aec10d537ce4595e416035367d703
workqueue: use "pool->cpu < 0" to stand for an unbound pool

There is a piece of sanity checks code in the put_unbound_pool().
The meaning of this code is "if it is not an unbound pool, it will complain
and return" IIUC. But the code uses "pool->flags & POOL_DISASSOCIATED"
imprecisely due to a non-unbound pool may also have this flags.

We should use "pool->cpu < 0" to stand for an unbound pool, so we covert the
code to it.

There is no strictly wrong if we still keep "pool->flags & POOL_DISASSOCIATED"
here, but it is just a noise if we keep it:
  1) we focus on "unbound" here, not "[dis]association".
  2) "pool->cpu < 0" already implies "pool->flags & POOL_DISASSOCIATED".

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