Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145236
b: refs/heads/master
c: d5a877e
h: refs/heads/master
v: v3
  • Loading branch information
James Bottomley authored and Linus Torvalds committed May 24, 2009
1 parent 7589410 commit d32b25a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 657cafa6b0f5296424d6f43f6f6eeb4a3222117e
refs/heads/master: d5a877e8dd409d8c702986d06485c374b705d340
20 changes: 12 additions & 8 deletions trunk/kernel/async.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,23 @@ extern int initcall_debug;
static async_cookie_t __lowest_in_progress(struct list_head *running)
{
struct async_entry *entry;
async_cookie_t ret = next_cookie; /* begin with "infinity" value */

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;
ret = entry->cookie;
}

if (!list_empty(&async_pending)) {
list_for_each_entry(entry, &async_pending, list)
if (entry->running == running) {
ret = entry->cookie;
break;
}
}

return ret;
}

static async_cookie_t lowest_in_progress(struct list_head *running)
Expand Down

0 comments on commit d32b25a

Please sign in to comment.