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

Commit b8158051 authored by Wei Yongjun's avatar Wei Yongjun Committed by Mike Snitzer
Browse files

dm cache policy mq: use list_del_init instead of list_del + INIT_LIST_HEAD

parent 8b64e881
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -287,9 +287,8 @@ static struct entry *alloc_entry(struct entry_pool *ep)
static struct entry *alloc_particular_entry(struct entry_pool *ep, dm_cblock_t cblock)
static struct entry *alloc_particular_entry(struct entry_pool *ep, dm_cblock_t cblock)
{
{
	struct entry *e = ep->entries + from_cblock(cblock);
	struct entry *e = ep->entries + from_cblock(cblock);
	list_del(&e->list);


	INIT_LIST_HEAD(&e->list);
	list_del_init(&e->list);
	INIT_HLIST_NODE(&e->hlist);
	INIT_HLIST_NODE(&e->hlist);
	ep->nr_allocated++;
	ep->nr_allocated++;