aboutsummaryrefslogtreecommitdiff
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2014-07-11 00:11:13 +0800
committerMoyster <oysterized@gmail.com>2017-12-05 18:08:30 +0100
commitfab3138887dda43fedd239404b973b4d65718a3e (patch)
tree71af7f24683ef4ce84d86d21e87ae33828b50b49 /kernel/workqueue.c
parent70b3539d5351588e3080e914ce164fc8a504225e (diff)
downloadandroid_kernel_m2note-fab3138887dda43fedd239404b973b4d65718a3e.tar.gz
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 893aac8b8..ee9aabf10 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1278,7 +1278,7 @@ static int try_to_grab_pending(struct work_struct *work, bool is_dwork,
pwq_activate_delayed_work(work);
list_del_init(&work->entry);
- pwq_dec_nr_in_flight(get_work_pwq(work), get_work_color(work));
+ pwq_dec_nr_in_flight(pwq, get_work_color(work));
/* work->data points to pwq iff queued, point to pool */
set_work_pool_and_keep_pending(work, pool->id);