X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=kernel%2Fasync.c;h=15319d6c18fe05a3b3bbb8c91e0c654e58356bb2;hb=b8ae30ee26d379db436b0b8c8c3ff1b52f69e5d1;hp=50540301ed0f2d5308ab15a012715bd0b53f0a04;hpb=d5a877e8dd409d8c702986d06485c374b705d340;p=safe%2Fjmp%2Flinux-2.6 diff --git a/kernel/async.c b/kernel/async.c index 5054030..15319d6 100644 --- a/kernel/async.c +++ b/kernel/async.c @@ -56,6 +56,7 @@ asynchronous and synchronous parts of the kernel. #include #include #include +#include #include static async_cookie_t next_cookie = 1; @@ -92,23 +93,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)