[PATCH V2 12/15] workqueue: add extra flags to set_work_worker_and_keep_pending()

From: Lai Jiangshan
Date: Mon Feb 18 2013 - 11:14:23 EST


Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxx>
---
kernel/workqueue.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index cdd5523..ab5c61a 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -544,9 +544,11 @@ static inline unsigned long worker_id_to_data(int worker_id)
}

static void set_work_worker_and_keep_pending(struct work_struct *work,
- int worker_id)
+ int worker_id,
+ unsigned long extra_flags)
{
- set_work_data(work, worker_id_to_data(worker_id), WORK_STRUCT_PENDING);
+ set_work_data(work, worker_id_to_data(worker_id),
+ extra_flags | WORK_STRUCT_PENDING);
}

static void set_work_worker_and_clear_pending(struct work_struct *work,
@@ -1157,7 +1159,7 @@ static int try_to_grab_pending(struct work_struct *work, bool is_dwork,
else
worker_id = WORK_OFFQ_WORKER_NONE;

- set_work_worker_and_keep_pending(work, worker_id);
+ set_work_worker_and_keep_pending(work, worker_id, 0);

spin_unlock(&pool->lock);
return 1;
--
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/