mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 21:57:43 +00:00
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>
This commit is contained in:
parent
3e5510ab0c
commit
e55b689268
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ void thread_pool_del_worker(struct thread_pool *p)
|
||||||
{
|
{
|
||||||
struct thread_pool_worker *w = NULL;
|
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);
|
wait_event(p->wait, !list_empty(&p->ready_list) || !p->thread_num);
|
||||||
|
|
||||||
dprintk("%s: locking list_empty: %d, thread_num: %d.\n",
|
dprintk("%s: locking list_empty: %d, thread_num: %d.\n",
|
||||||
|
|
Loading…
Reference in a new issue