Wait for cleaner thread completion before destroying priv
_cas_stop_thread() function synchronizes with cleaner thread, so after that we can be sure that there are no more ongoing cleaning requests. Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
parent
005241b51c
commit
737d19f00d
@ -238,7 +238,7 @@ void cas_kick_cleaner_thread(ocf_cleaner_t c)
|
|||||||
void cas_stop_cleaner_thread(ocf_cleaner_t c)
|
void cas_stop_cleaner_thread(ocf_cleaner_t c)
|
||||||
{
|
{
|
||||||
struct cas_thread_info *info = ocf_cleaner_get_priv(c);
|
struct cas_thread_info *info = ocf_cleaner_get_priv(c);
|
||||||
ocf_cleaner_set_priv(c, NULL);
|
|
||||||
_cas_stop_thread(info);
|
_cas_stop_thread(info);
|
||||||
|
ocf_cleaner_set_priv(c, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user