Messages in this thread Patch in this message | | | From | Lai Jiangshan <> | Subject | [PATCH 01/10] workqueue: always pass flush responsibility to next | Date | Mon, 24 Sep 2012 18:07:03 +0800 |
| |
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
| |