async: use list_move_tail
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Mon, 2 Feb 2009 12:24:34 +0000 (13:24 +0100)
committerArjan van de Ven <arjan@linux.intel.com>
Sun, 8 Feb 2009 18:00:26 +0000 (10:00 -0800)
list.h provides a dedicated primitive for
"list_del followed by list_add_tail"... list_move_tail.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
kernel/async.c

index e23399d88bac44aef003fb12937ac3a407af2e32..f565891f2c9bd069873b93c12e7ecb0424876c90 100644 (file)
@@ -133,8 +133,7 @@ static void run_one_entry(void)
        entry = list_first_entry(&async_pending, struct async_entry, list);
 
        /* 2) move it to the running queue */
-       list_del(&entry->list);
-       list_add_tail(&entry->list, entry->running);
+       list_move_tail(&entry->list, entry->running);
        spin_unlock_irqrestore(&async_lock, flags);
 
        /* 3) run it (and print duration)*/