Skip to content

Commit

Permalink
dm cache policy mq: use list_del_init instead of list_del + INIT_LIST…
Browse files Browse the repository at this point in the history
…_HEAD

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
  • Loading branch information
Wei Yongjun authored and Mike Snitzer committed Jan 7, 2014
1 parent 8b64e88 commit b815805
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/md/dm-cache-policy-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;

Expand Down

0 comments on commit b815805

Please sign in to comment.