Skip to content

Commit 7a89bbc

Browse files
cohuckfenrus75
authored andcommitted
async: Fix running list handling.
async_schedule() should pass in async_running as the running list, and run_one_entry() should put the entry to be run on the provided running list instead of always on the generic one. Reported-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
1 parent e83102c commit 7a89bbc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎kernel/async.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ static void run_one_entry(void)
133133

134134
/* 2) move it to the running queue */
135135
list_del(&entry->list);
136-
list_add_tail(&entry->list, &async_running);
136+
list_add_tail(&entry->list, entry->running);
137137
spin_unlock_irqrestore(&async_lock, flags);
138138

139139
/* 3) run it (and print duration)*/
@@ -210,7 +210,7 @@ static async_cookie_t __async_schedule(async_func_ptr *ptr, void *data, struct l
210210

211211
async_cookie_t async_schedule(async_func_ptr *ptr, void *data)
212212
{
213-
return __async_schedule(ptr, data, &async_pending);
213+
return __async_schedule(ptr, data, &async_running);
214214
}
215215
EXPORT_SYMBOL_GPL(async_schedule);
216216

0 commit comments

Comments
 (0)