summaryrefslogtreecommitdiffstats
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
parenta71a261f5c39685698f7f1970dc7046b36e132d1 (diff)
downloadop-kernel-dev-54499afbb80e44ae5511984486b4b33d6229fceb.zip
op-kernel-dev-54499afbb80e44ae5511984486b4b33d6229fceb.tar.gz
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>
-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 cc06a1e..b9e006a 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]);
}
/*----------------------------------------------------------------
OpenPOWER on IntegriCloud