summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-10-12 17:59:44 +0200
committerAlasdair G Kergon <agk@redhat.com>2012-10-12 17:59:44 +0200
commit54499afbb80e44ae5511984486b4b33d6229fceb (patch)
treef6a6f02a5f7b7b6666390d024eee256785899313 /drivers
parentdm mpath: fix check for null mpio in end_io fn (diff)
downloadlinux-54499afbb80e44ae5511984486b4b33d6229fceb.tar.xz
linux-54499afbb80e44ae5511984486b4b33d6229fceb.zip
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 '')
-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]);
}
/*----------------------------------------------------------------