dm cache policy mq: use list_del_init instead of list_del + INIT_LIST_HEAD
[firefly-linux-kernel-4.4.55.git] / drivers / md / dm-cache-policy-mq.c
index 64780ad73bb01737a957ea9682d016da4dbffa93..7f1aaa38a7e0eb1fb20f78bb63196a23270c90ef 100644 (file)
@@ -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)
 {
        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);
        ep->nr_allocated++;