diff options
| author | J. Bruce Fields <bfields@citi.umich.edu> | 2009-06-15 18:08:07 -0700 |
|---|---|---|
| committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-06-15 18:08:07 -0700 |
| commit | 7eef4091a653c243a87e5375c54504cc03bec4d8 (patch) | |
| tree | f65b77f830b2c8f7d014512badfef5df0d591ee9 /kernel/async.c | |
| parent | 0a93a47f042c459f0f46942c3a920e3c81878031 (diff) | |
| parent | 07a2039b8eb0af4ff464efd3dfd95de5c02648c6 (diff) | |
Merge commit 'v2.6.30' into for-2.6.31
Diffstat (limited to 'kernel/async.c')
| -rw-r--r-- | kernel/async.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/kernel/async.c b/kernel/async.c index 968ef9457d4e..27235f5de198 100644 --- a/kernel/async.c +++ b/kernel/async.c @@ -92,19 +92,18 @@ extern int initcall_debug; static async_cookie_t __lowest_in_progress(struct list_head *running) { struct async_entry *entry; + if (!list_empty(running)) { entry = list_first_entry(running, struct async_entry, list); return entry->cookie; - } else if (!list_empty(&async_pending)) { - entry = list_first_entry(&async_pending, - struct async_entry, list); - return entry->cookie; - } else { - /* nothing in progress... next_cookie is "infinity" */ - return next_cookie; } + list_for_each_entry(entry, &async_pending, list) + if (entry->running == running) + return entry->cookie; + + return next_cookie; /* "infinity" value */ } static async_cookie_t lowest_in_progress(struct list_head *running) |
