dm log: userspace use list_move
authorKirill A. Shutemov <kirill@shutemov.name>
Tue, 2 Aug 2011 11:32:02 +0000 (12:32 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Tue, 2 Aug 2011 11:32:02 +0000 (12:32 +0100)
Replace list_del() followed by list_add() with list_move().

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-log-userspace-base.c

index aa2e0c374ab3e0c985e6bdc6536807bc07bcf3ce..1021c89860116a5bb6e3a2faea1362c0ea805f52 100644 (file)
@@ -394,8 +394,7 @@ static int flush_by_group(struct log_c *lc, struct list_head *flush_list)
                        group[count] = fe->region;
                        count++;
 
-                       list_del(&fe->list);
-                       list_add(&fe->list, &tmp_list);
+                       list_move(&fe->list, &tmp_list);
 
                        type = fe->type;
                        if (count >= MAX_FLUSH_GROUP_COUNT)