From: Tejun Heo Date: Tue, 12 Mar 2013 18:30:04 +0000 (-0700) Subject: workqueue: perform non-reentrancy test when queueing to unbound workqueues too X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~125^2~56 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9178087acd71b4ea010ea48e147cf66952d2da9;p=pandora-kernel.git workqueue: perform non-reentrancy test when queueing to unbound workqueues too Because per-cpu workqueues have multiple pwqs (pool_workqueues) to serve the CPUs, to guarantee that a single work item isn't queued on one pwq while still executing another, __queue_work() takes a look at the previous pool the target work item was on and if it's still executing there, queue the work item on that pool. To support changing workqueue_attrs on the fly, unbound workqueues too will have multiple pwqs and thus need non-reentrancy test when queueing. This patch modifies __queue_work() such that the reentrancy test is performed regardless of the workqueue type. per_cpu_ptr(wq->cpu_pwqs, cpu) used to be used to determine the matching pwq for the last pool. This can't be used for unbound workqueues and is replaced with worker->current_pwq which also happens to be simpler. Signed-off-by: Tejun Heo Reviewed-by: Lai Jiangshan --- Reading git-diff-tree failed