Skip to content

Commit

Permalink
async: make async_synchronize_full() more serializing
Browse files Browse the repository at this point in the history
turns out that there are real problems with allowing async
tasks that are scheduled from async tasks to run after
the async_synchronize_full() returns.

This patch makes the _full more strict and a complete
synchronization. Later I might need to add back a lighter
form of synchronization for other uses.. but not right now.

Signed-off-by: Arjan van de Ven <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
fenrus75 authored and torvalds committed Jan 8, 2009
1 parent 85da1fb commit 33b04b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kernel/async.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ EXPORT_SYMBOL_GPL(async_schedule_special);

void async_synchronize_full(void)
{
async_synchronize_cookie(next_cookie);
do {
async_synchronize_cookie(next_cookie);
} while (!list_empty(&async_running) || !list_empty(&async_pending));
}
EXPORT_SYMBOL_GPL(async_synchronize_full);

Expand Down

0 comments on commit 33b04b9

Please sign in to comment.