Thread (2 messages) 2 messages, 2 authors, 2013-11-15

Re: [dm-devel] [PATCH -next] dm cache policy mq:: use list_del_init instead of list_del/INIT_LIST_HEAD

From: Joe Thornber <hidden>
Date: 2013-11-15 10:58:23
Also in: dm-devel

ACK

On Fri, Nov 15, 2013 at 05:47:12PM +0800, Wei Yongjun wrote:
quoted hunk ↗ jump to hunk
From: Wei Yongjun <redacted>

Using list_del_init() instead of list_del() + INIT_LIST_HEAD().

Signed-off-by: Wei Yongjun <redacted>
---
 drivers/md/dm-cache-policy-mq.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/md/dm-cache-policy-mq.c b/drivers/md/dm-cache-policy-mq.c
index 7209fab..ac7d3b3 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++;
 

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help