aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-10-12 11:59:44 -0400
committerAlasdair G Kergon <agk@redhat.com>2012-10-12 11:59:44 -0400
commit54499afbb80e44ae5511984486b4b33d6229fceb (patch)
treef6a6f02a5f7b7b6666390d024eee256785899313 /drivers
parenta71a261f5c39685698f7f1970dc7046b36e132d1 (diff)
dm bufio: use list_move
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/dm-bufio.c3
1 files changed, 1 insertions, 2 deletions
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)
441 c->n_buffers[b->list_mode]--; 441 c->n_buffers[b->list_mode]--;
442 c->n_buffers[dirty]++; 442 c->n_buffers[dirty]++;
443 b->list_mode = dirty; 443 b->list_mode = dirty;
444 list_del(&b->lru_list); 444 list_move(&b->lru_list, &c->lru[dirty]);
445 list_add(&b->lru_list, &c->lru[dirty]);
446} 445}
447 446
448/*---------------------------------------------------------------- 447/*----------------------------------------------------------------