Merge pull request #355 from mmichal10/async-stop-compl

Async stop compl
This commit is contained in:
Robert Baldyga
2020-03-23 13:00:50 +01:00
committed by GitHub
3 changed files with 88 additions and 40 deletions

View File

@@ -54,7 +54,7 @@ static int _cas_io_queue_thread(void *data)
wait_for_completion(&info->compl);
printk(KERN_DEBUG "Thread %s stopped\n", info->name);
kfree(info);
do_exit(0);
module_put_and_exit(0);
return 0;
}
@@ -115,7 +115,7 @@ static int _cas_cleaner_thread(void *data)
wait_for_completion(&info->compl);
kfree(info);
do_exit(0);
module_put_and_exit(0);
return 0;
}
@@ -149,7 +149,7 @@ static int _cas_metadata_updater_thread(void *data)
wait_for_completion(&info->compl);
kfree(info);
do_exit(0);
module_put_and_exit(0);
return 0;
}
@@ -183,6 +183,8 @@ static int _cas_create_thread(struct cas_thread_info **pinfo,
}
info->thread = thread;
BUG_ON(!try_module_get(THIS_MODULE));
/* Affinitize thread to core */
if (cpu != CAS_CPUS_ALL)
kthread_bind(thread, cpu);