]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
dm bufio: use list_move
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 12 Oct 2012 15:59:44 +0000 (16:59 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Fri, 12 Oct 2012 15:59:44 +0000 (16:59 +0100)
Use list_move() instead of list_del() + list_add().

spatch with a semantic match was used to find this.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-bufio.c

index cc06a1e5242395c9d05e26b76c71849490f348af..b9e006aa60624566c5af0db2d139be9ea7551e33 100644 (file)
@@ -441,8 +441,7 @@ static void __relink_lru(struct dm_buffer *b, int dirty)
        c->n_buffers[b->list_mode]--;
        c->n_buffers[dirty]++;
        b->list_mode = dirty;
-       list_del(&b->lru_list);
-       list_add(&b->lru_list, &c->lru[dirty]);
+       list_move(&b->lru_list, &c->lru[dirty]);
 }
 
 /*----------------------------------------------------------------