mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 11:41:35 +01:00
Remove uneeded flush work in workqueue_cheat
This commit is contained in:
@@ -43,9 +43,6 @@ void cleanup_module(void)
|
|||||||
{
|
{
|
||||||
/* This waits for the work to finish. From docstring: */
|
/* This waits for the work to finish. From docstring: */
|
||||||
/* > Cancel @work and wait for its execution to finish. */
|
/* > Cancel @work and wait for its execution to finish. */
|
||||||
cancel_work(&work);
|
cancel_work_sync(&work);
|
||||||
|
|
||||||
/*cancel_work(&work);*/
|
|
||||||
|
|
||||||
destroy_workqueue(queue);
|
destroy_workqueue(queue);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,9 +39,6 @@ int init_module(void)
|
|||||||
|
|
||||||
void cleanup_module(void)
|
void cleanup_module(void)
|
||||||
{
|
{
|
||||||
/* TODO why is this needed? Why flush_workqueue doesn't work? (re-insmod panics)
|
/* Waits for jobs to finish. */
|
||||||
* http://stackoverflow.com/questions/37216038/whats-the-difference-between-flush-delayed-work-and-cancel-delayed-work-sync */
|
|
||||||
/*flush_workqueue(queue);*/
|
|
||||||
cancel_work_sync(&work);
|
|
||||||
destroy_workqueue(queue);
|
destroy_workqueue(queue);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user