Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54499afb authored by Wei Yongjun's avatar Wei Yongjun Committed by Alasdair G Kergon
Browse files

dm bufio: use list_move

Use list_move() instead of list_del() + list_add().

spatch with a semantic match was used to find this.
(http://coccinelle.lip6.fr/

)

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
parent a71a261f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -441,8 +441,7 @@ static void __relink_lru(struct dm_buffer *b, int dirty)
	c->n_buffers[b->list_mode]--;
	c->n_buffers[dirty]++;
	b->list_mode = dirty;
	list_del(&b->lru_list);
	list_add(&b->lru_list, &c->lru[dirty]);
	list_move(&b->lru_list, &c->lru[dirty]);
}

/*----------------------------------------------------------------