From e1c77f0be8caa167c1de7f2cb5535c5d6ddfb64b Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 8 Jun 2009 12:31:53 -0700 Subject: [PATCH] --- yaml --- r: 145551 b: refs/heads/master c: 3af968e066d593bc4dacc021715f3e95ddf0996f h: refs/heads/master i: 145549: 70398494d020e81c7a9bc1562bb5558402df5dca 145547: c40af204c70cbb8211586bf562a863d747a8ed4d 145543: 8986ee7429b6897e5835bfc6e40c81323ae317d7 145535: 31520193b75a5ed1d9cfd1d1a8de25836face410 v: v3 --- [refs] | 2 +- trunk/kernel/async.c | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 16df6a0038ed..f83a8e7bab91 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 46056be71c37378f518711da651e4bb76d650ee9 +refs/heads/master: 3af968e066d593bc4dacc021715f3e95ddf0996f diff --git a/trunk/kernel/async.c b/trunk/kernel/async.c index 50540301ed0f..27235f5de198 100644 --- a/trunk/kernel/async.c +++ b/trunk/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)