]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit85d1319120e8e237e8d04888b235b7eaa4d0349c
treeb40f69b265def3d67d2ea67b06584bc2e7437678
parent5d432f74c7baa0752c53be23d295d0a48f8541fc
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