Skip to contentSkip to conversation

workqueue: reuse the calculated pwq in try_to_grab_pending()

PATCH Applied Lai Jiangshan 2 participants 2 messages Jul 10, 2014 – Jul 11, 2014 Workqueue

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 workqueue: reuse the calculated pwq in try_to_grab_pending()

Subsitute the get_work_pwq(work) to pwq since it is calculated.

---
 kernel/workqueue.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/workqueue.c +1 -1
index c820057..7fc3df3 100644
@@ -1225,7 +1225,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);
Signature · 1 line
1.7.4.4
maintainer Applied
#1 lore raw
Quoted 3 lines · Lai Jiangshan

Subsitute the get_work_pwq(work) to pwq since it is calculated.

Applied to libata/for-3.17 w/ updated patch description.

Thanks.

Signature · 1 line
tejun