Hi,
According to description of 'destroy_workqueue()':
"Safely destroy a workqueue. All work currently pending will be done
first"
Looking deeper at the code, it turns out that the call chain is:
destroy_workqueue
--> drain_workqueue
--> flush_workqueue
So, calling explicitly 'flush_workqueue()' before 'destroy_workqueue()'
looks redundant.
Using following coccinelle script spots ~90 occurrences, in ~80 files,
which can be simplified.
>>>>>>>>>>>>>>>
@r@
expression e;
@@
- flush_workqueue(e);
destroy_workqueue(e);
>>>>>>>>>>>>>>>
This is way to much for me because my patch submission process is mainly
manual.
If you agree with my analysis, think that removing these redundant calls
is useful and have a much more automated patch submission process than
me (or just have time :), please feel free to submit patches.
Best regards,
CJ