Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350295
b: refs/heads/master
c: 4468a00
h: refs/heads/master
i:
  350293: 8398f82
  350291: d851e31
  350287: 52287e7
v: v3
  • Loading branch information
Lai Jiangshan authored and Tejun Heo committed Feb 7, 2013
1 parent c252faa commit 4f9c2cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 60c057bca22285efefbba033624763a778f243bf
refs/heads/master: 4468a00fd9a274fe1b30c886370d662e4a439efb
10 changes: 10 additions & 0 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,13 @@ static void set_work_cwq(struct work_struct *work,
WORK_STRUCT_PENDING | WORK_STRUCT_CWQ | extra_flags);
}

static void set_work_pool_and_keep_pending(struct work_struct *work,
int pool_id)
{
set_work_data(work, (unsigned long)pool_id << WORK_OFFQ_POOL_SHIFT,
WORK_STRUCT_PENDING);
}

static void set_work_pool_and_clear_pending(struct work_struct *work,
int pool_id)
{
Expand Down Expand Up @@ -1115,6 +1122,9 @@ static int try_to_grab_pending(struct work_struct *work, bool is_dwork,
cwq_dec_nr_in_flight(get_work_cwq(work),
get_work_color(work));

/* work->data points to cwq iff queued, point to pool */
set_work_pool_and_keep_pending(work, pool->id);

spin_unlock(&pool->lock);
return 1;
}
Expand Down

0 comments on commit 4f9c2cf

Please sign in to comment.