summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-bufio.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-10-12 16:59:44 +0100
committerAlasdair G Kergon <agk@redhat.com>2012-10-12 16:59:44 +0100
commit54499afbb80e44ae5511984486b4b33d6229fceb (patch)
treef6a6f02a5f7b7b6666390d024eee256785899313 /drivers/md/dm-bufio.c
parenta71a261f5c39685698f7f1970dc7046b36e132d1 (diff)
downloadlinux-54499afbb80e44ae5511984486b4b33d6229fceb.tar.bz2
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/md/dm-bufio.c')
-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)
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]);
}
/*----------------------------------------------------------------