summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-cache-policy-mq.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-11-18 13:32:43 -0500
committerMike Snitzer <snitzer@redhat.com>2014-01-07 10:14:32 -0500
commitb815805154cc62debbc423a6c27ae39290b300ae (patch)
tree290941478bc8e89af393f726b054658e11ded1d1 /drivers/md/dm-cache-policy-mq.c
parent8b64e881eb40ac8b9bfcbce068a97eef819044ee (diff)
dm cache policy mq: use list_del_init instead of list_del + INIT_LIST_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>
Diffstat (limited to 'drivers/md/dm-cache-policy-mq.c')
-rw-r--r--drivers/md/dm-cache-policy-mq.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/dm-cache-policy-mq.c b/drivers/md/dm-cache-policy-mq.c
index 64780ad73bb..7f1aaa38a7e 100644
--- a/drivers/md/dm-cache-policy-mq.c
+++ b/drivers/md/dm-cache-policy-mq.c
@@ -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++;