lkml.org 
[lkml]   [2012]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 01/10] workqueue: always pass flush responsibility to next
Date
depriving the responsibility make the code complex, we pass it to the next
unconditionally.

After this change, we don't need to go back to repeat cascading, so we use
"break" to exit the loop.

The loop will be remove in later patch.

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

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index a59171a..360b7e2 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -2740,15 +2740,8 @@ void flush_workqueue(struct workqueue_struct *wq)

list_del_init(&next->list);
wq->first_flusher = next;
-
- if (flush_workqueue_prep_cwqs(wq, wq->flush_color, -1))
- break;
-
- /*
- * Meh... this color is already done, clear first
- * flusher and repeat cascading.
- */
- wq->first_flusher = NULL;
+ flush_workqueue_prep_cwqs(wq, wq->flush_color, -1);
+ break;
}

out_unlock:
--
1.7.4.4


\
 
 \ /
  Last update: 2012-09-24 13:01    [W:0.287 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site