aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/dst/thread_pool.c
diff options
context:
space:
mode:
authorEvgeniy Polyakov <zbr@ioremap.net>2009-01-19 20:20:35 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-03 14:53:33 -0700
commite55b689268391a3b0a0d20c951b60b2d88a5e105 (patch)
treebf2e5e15f9a4cd0a3654a62ed608f8a0987d4d43 /drivers/staging/dst/thread_pool.c
parentStaging: DST: optimize bio allocation. (diff)
downloadlinux-dev-e55b689268391a3b0a0d20c951b60b2d88a5e105.tar.xz
linux-dev-e55b689268391a3b0a0d20c951b60b2d88a5e105.zip
Staging: DST: extend thread pool exit conditions.
Added thread pool exit condition into the thread_pool_del_worker(). If called in parallel another thread can steal Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/dst/thread_pool.c')
-rw-r--r--drivers/staging/dst/thread_pool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/dst/thread_pool.c b/drivers/staging/dst/thread_pool.c
index c35754d5ec6d..7bed4e851029 100644
--- a/drivers/staging/dst/thread_pool.c
+++ b/drivers/staging/dst/thread_pool.c
@@ -115,7 +115,7 @@ void thread_pool_del_worker(struct thread_pool *p)
{
struct thread_pool_worker *w = NULL;
- while (!w) {
+ while (!w && p->thread_num) {
wait_event(p->wait, !list_empty(&p->ready_list) || !p->thread_num);
dprintk("%s: locking list_empty: %d, thread_num: %d.\n",