workqueue: remove workqueue_struct->pool_wq.single
authorTejun Heo <tj@kernel.org>
Tue, 12 Mar 2013 18:29:59 +0000 (11:29 -0700)
committerTejun Heo <tj@kernel.org>
Tue, 12 Mar 2013 18:29:59 +0000 (11:29 -0700)
commit420c0ddb1f205a3511b766d0dfee2cc87ed9dae0
treeb40f69b265def3d67d2ea67b06584bc2e7437678
parentd84ff0512f1bfc0d8c864efadb4523fce68919cc
workqueue: remove workqueue_struct->pool_wq.single

workqueue->pool_wq union is used to point either to percpu pwqs
(pool_workqueues) or single unbound pwq.  As the first pwq can be
accessed via workqueue->pwqs list, there's no reason for the single
pointer anymore.

Use list_first_entry(workqueue->pwqs) to access the unbound pwq and
drop workqueue->pool_wq.single pointer and the pool_wq union.  It
simplifies the code and eases implementing multiple unbound pools w/
custom attributes.

This patch doesn't introduce any visible behavior changes.

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