[PATCH 01/10] workqueue: always pass flush responsibility to next

2012-09-24 Thread Lai Jiangshan
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 
---
 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(>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

--
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/


[PATCH 01/10] workqueue: always pass flush responsibility to next

2012-09-24 Thread Lai Jiangshan
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 la...@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

--
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/