Skip to content

Commit

Permalink
dm log: userspace use list_move
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kirill A. Shutemov authored and Alasdair G Kergon committed Aug 2, 2011
1 parent c8f543e commit 6c9b27a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/md/dm-log-userspace-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6c9b27a

Please sign in to comment.