]> git.baikalelectronics.ru Git - kernel.git/commit
workqueue: reject adjusting max_active or applying attrs to ordered workqueues
authorTejun Heo <tj@kernel.org>
Tue, 12 Mar 2013 18:30:04 +0000 (11:30 -0700)
committerTejun Heo <tj@kernel.org>
Tue, 12 Mar 2013 18:30:04 +0000 (11:30 -0700)
commit93756e8782abd64f2ce34b1fb8daefd20d09bdc9
tree3132f4c6ed84ec893bcad3aaec230fa78cede95d
parent0c1d70035fb0ac9b1f85dc083cab6341a49aff29
workqueue: reject adjusting max_active or applying attrs to ordered workqueues

Adjusting max_active of or applying new workqueue_attrs to an ordered
workqueue breaks its ordering guarantee.  The former is obvious.  The
latter is because applying attrs creates a new pwq (pool_workqueue)
and there is no ordering constraint between the old and new pwqs.

Make apply_workqueue_attrs() and workqueue_set_max_active() trigger
WARN_ON() if those operations are requested on an ordered workqueue
and fail / ignore respectively.

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