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:
Robert Baldyga 2022-04-07 14:07:06 +02:00
parent 005241b51c
commit 737d19f00d

View File

@ -238,7 +238,7 @@ void cas_kick_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);
ocf_cleaner_set_priv(c, NULL);
_cas_stop_thread(info);
ocf_cleaner_set_priv(c, NULL);
}