提交 54499afb 编写于 作者: W Wei Yongjun 提交者: Alasdair G Kergon

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: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
上级 a71a261f
...@@ -441,8 +441,7 @@ static void __relink_lru(struct dm_buffer *b, int dirty) ...@@ -441,8 +441,7 @@ static void __relink_lru(struct dm_buffer *b, int dirty)
c->n_buffers[b->list_mode]--; c->n_buffers[b->list_mode]--;
c->n_buffers[dirty]++; c->n_buffers[dirty]++;
b->list_mode = dirty; b->list_mode = dirty;
list_del(&b->lru_list); list_move(&b->lru_list, &c->lru[dirty]);
list_add(&b->lru_list, &c->lru[dirty]);
} }
/*---------------------------------------------------------------- /*----------------------------------------------------------------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册