diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-10-12 16:59:44 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2012-10-12 16:59:44 +0100 |
commit | 54499afbb80e44ae5511984486b4b33d6229fceb (patch) | |
tree | f6a6f02a5f7b7b6666390d024eee256785899313 /drivers/md/dm-bufio.c | |
parent | a71a261f5c39685698f7f1970dc7046b36e132d1 (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/md/dm-bufio.c')
-rw-r--r-- | drivers/md/dm-bufio.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c index cc06a1e5242..b9e006aa606 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]); } /*---------------------------------------------------------------- |