Skip to content

Commit

Permalink
Staging: DST: extend thread pool exit conditions.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Evgeniy Polyakov authored and Greg Kroah-Hartman committed Apr 3, 2009
1 parent 3e5510a commit e55b689
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/dst/thread_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit e55b689

Please sign in to comment.