提交 a506c13a 编写于 作者: L Lars Ellenberg 提交者: Philipp Reisner

drbd: use list_move_tail instead of list_del/list_add_tail

Using list_move_tail() instead of list_del() + list_add_tail().

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)
Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
上级 1b6dd252
......@@ -134,8 +134,7 @@ static void drbd_endio_write_sec_final(struct drbd_peer_request *peer_req) __rel
spin_lock_irqsave(&mdev->tconn->req_lock, flags);
mdev->writ_cnt += peer_req->i.size >> 9;
list_del(&peer_req->w.list); /* has been on active_ee or sync_ee */
list_add_tail(&peer_req->w.list, &mdev->done_ee);
list_move_tail(&peer_req->w.list, &mdev->done_ee);
/*
* Do not remove from the write_requests tree here: we did not send the
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册