From: Wei Yongjun Date: Sun, 14 Oct 2012 22:39:18 +0000 (+1100) Subject: Use list_move() instead of list_del() + list_add(). X-Git-Tag: next-20121015~29^2~6 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ea290c4b40bd2c94c0a180ec273c05b2925ea85b;p=karo-tx-linux.git 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 Signed-off-by: Alasdair G Kergon --- diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c index cc06a1e52423..b9e006aa6062 100644 --- a/drivers/md/dm-bufio.c +++ b/drivers/md/dm-bufio.c @@ -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]); } /*----------------------------------------------------------------