X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=kernel%2Fasync.c;h=27235f5de198997180d4a293adc932d48c6101c7;hb=2d74b2c62cf8867d0762f6e6b5ed8906cb6a745f;hp=50540301ed0f2d5308ab15a012715bd0b53f0a04;hpb=700d4558fc947542218e6acbc20d1347981ea399;p=~andy%2Flinux diff --git a/kernel/async.c b/kernel/async.c index 50540301ed0..27235f5de19 100644 --- a/kernel/async.c +++ b/kernel/async.c @@ -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)