rebind_workers() can't return until all workers notify itself, it means when rebind_workers() returns, all queued busy_worker.rebind_work have launched, the pending bit is cleared.
When the new rebind_workers() comes, it dozn't need to test the already known cleared pending bit. Signed-off-by: Lai Jiangshan <la...@cn.fujitsu.com> --- kernel/workqueue.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 3e0bd20..eec11c3 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -1420,10 +1420,6 @@ static void rebind_workers(struct global_cwq *gcwq) for_each_busy_worker(worker, i, pos, gcwq) { struct work_struct *rebind_work = &worker->rebind_work; - if (test_and_set_bit(WORK_STRUCT_PENDING_BIT, - work_data_bits(rebind_work))) - continue; - all_cnt++; worker->worker_rebind = &worker_rebind; -- 1.7.4.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/