[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1361203940-6300-12-git-send-email-laijs@cn.fujitsu.com>
Date: Tue, 19 Feb 2013 00:12:12 +0800
From: Lai Jiangshan <laijs@...fujitsu.com>
To: Tejun Heo <tj@...nel.org>, linux-kernel@...r.kernel.org
Cc: Lai Jiangshan <laijs@...fujitsu.com>
Subject: [PATCH V2 11/15] workqueue: split work_flags to delayed_flags and color_flags in __queue_work()
Allow we use delayed_flags only in different path in later patches.
Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
---
kernel/workqueue.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 7ac6824..cdd5523 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1226,7 +1226,7 @@ static void __queue_work(unsigned int cpu, struct workqueue_struct *wq,
{
struct cpu_workqueue_struct *cwq;
struct list_head *worklist;
- unsigned int work_flags;
+ unsigned int color_flags, delayed_flags = 0;
unsigned int req_cpu = cpu;
/*
@@ -1284,18 +1284,18 @@ static void __queue_work(unsigned int cpu, struct workqueue_struct *wq,
}
cwq->nr_in_flight[cwq->work_color]++;
- work_flags = work_color_to_flags(cwq->work_color);
if (likely(cwq->nr_active < cwq->max_active)) {
trace_workqueue_activate_work(work);
cwq->nr_active++;
worklist = &cwq->pool->worklist;
} else {
- work_flags |= WORK_STRUCT_DELAYED;
+ delayed_flags = WORK_STRUCT_DELAYED;
worklist = &cwq->delayed_works;
}
- insert_work(cwq, work, worklist, work_flags);
+ color_flags = work_color_to_flags(cwq->work_color);
+ insert_work(cwq, work, worklist, color_flags | delayed_flags);
spin_unlock(&cwq->pool->lock);
}
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists