Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145551
b: refs/heads/master
c: 3af968e
h: refs/heads/master
i:
  145549: 7039849
  145547: c40af20
  145543: 8986ee7
  145535: 3152019
v: v3
  • Loading branch information
Linus Torvalds committed Jun 8, 2009
1 parent b8ae4e3 commit e1c77f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 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: 46056be71c37378f518711da651e4bb76d650ee9
refs/heads/master: 3af968e066d593bc4dacc021715f3e95ddf0996f
15 changes: 5 additions & 10 deletions trunk/kernel/async.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,23 +92,18 @@ 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);
ret = entry->cookie;
return entry->cookie;
}

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

return ret;
return next_cookie; /* "infinity" value */
}

static async_cookie_t lowest_in_progress(struct list_head *running)
Expand Down

0 comments on commit e1c77f0

Please sign in to comment.