aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2014-07-10 12:11:13 -0400
committerTejun Heo <tj@kernel.org>2014-07-11 11:14:50 -0400
commit9c34a7042e6fe79b900bd44db03dde8a4ecdf6f6 (patch)
tree1ff3a9f8b3fdea4fd8e7a2e2bbcb43b91e0aa96b /kernel/workqueue.c
parent85327af61d4cb1700d4c71e8080f7c7df9bccafb (diff)
workqueue: reuse the already calculated pwq in try_to_grab_pending()
try_to_grab_pending() was re-calculating the associated pwq using get_work_pwq() when it already has it cached in a local varible and the association can't change. Reuse the local variable instead. This doesn't introduce any functional changes. tj: Updated description. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index f344334f5690..338d418ba6aa 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1225,7 +1225,7 @@ static int try_to_grab_pending(struct work_struct *work, bool is_dwork,
1225 pwq_activate_delayed_work(work); 1225 pwq_activate_delayed_work(work);
1226 1226
1227 list_del_init(&work->entry); 1227 list_del_init(&work->entry);
1228 pwq_dec_nr_in_flight(get_work_pwq(work), get_work_color(work)); 1228 pwq_dec_nr_in_flight(pwq, get_work_color(work));
1229 1229
1230 /* work->data points to pwq iff queued, point to pool */ 1230 /* work->data points to pwq iff queued, point to pool */
1231 set_work_pool_and_keep_pending(work, pool->id); 1231 set_work_pool_and_keep_pending(work, pool->id);