Ensure that any scheduled work has run to completion.
void flush_workqueue(struct workqueue_struct * wq);
wq
workqueue to flush
This function sleeps until all work items which were queued on entry have finished execution, but it is not livelocked by new incoming ones.