mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] workqueue: reuse the calculated pwq in try_to_grab_pending()
@ 2014-07-10 16:11 Lai Jiangshan
  2014-07-11 15:17 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Lai Jiangshan @ 2014-07-10 16:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Tejun Heo, Lai Jiangshan

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

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
 kernel/workqueue.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index c820057..7fc3df3 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,
 			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);
-- 
1.7.4.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] workqueue: reuse the calculated pwq in try_to_grab_pending()
  2014-07-10 16:11 [PATCH] workqueue: reuse the calculated pwq in try_to_grab_pending() Lai Jiangshan
@ 2014-07-11 15:17 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2014-07-11 15:17 UTC (permalink / raw)
  To: Lai Jiangshan; +Cc: linux-kernel

On Fri, Jul 11, 2014 at 12:11:13AM +0800, Lai Jiangshan wrote:
> Subsitute the get_work_pwq(work) to pwq since it is calculated.
> 
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>

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

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-11 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-10 16:11 [PATCH] workqueue: reuse the calculated pwq in try_to_grab_pending() Lai Jiangshan
2014-07-11 15:17 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®