mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
Delete slow-work timers properly
Slow-work appears to delete its timer as soon as the first user unregisters, even though other users could be active. At the same time, it never seems to delete slow_work_oom_timer. Arrange for both to happen in the shutdown path. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
3e241ff0c5
commit
418df63c2d
1 changed files with 2 additions and 2 deletions
|
@ -609,14 +609,14 @@ void slow_work_unregister_user(void)
|
||||||
if (slow_work_user_count == 0) {
|
if (slow_work_user_count == 0) {
|
||||||
printk(KERN_NOTICE "Slow work thread pool: Shutting down\n");
|
printk(KERN_NOTICE "Slow work thread pool: Shutting down\n");
|
||||||
slow_work_threads_should_exit = true;
|
slow_work_threads_should_exit = true;
|
||||||
|
del_timer_sync(&slow_work_cull_timer);
|
||||||
|
del_timer_sync(&slow_work_oom_timer);
|
||||||
wake_up_all(&slow_work_thread_wq);
|
wake_up_all(&slow_work_thread_wq);
|
||||||
wait_for_completion(&slow_work_last_thread_exited);
|
wait_for_completion(&slow_work_last_thread_exited);
|
||||||
printk(KERN_NOTICE "Slow work thread pool:"
|
printk(KERN_NOTICE "Slow work thread pool:"
|
||||||
" Shut down complete\n");
|
" Shut down complete\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
del_timer_sync(&slow_work_cull_timer);
|
|
||||||
|
|
||||||
mutex_unlock(&slow_work_user_lock);
|
mutex_unlock(&slow_work_user_lock);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(slow_work_unregister_user);
|
EXPORT_SYMBOL(slow_work_unregister_user);
|
||||||
|
|
Loading…
Reference in a new issue