diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2012-09-26 08:16:30 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-09 08:11:39 -0500 |
commit | a506c13a4d1ec5e1f2f9bc0123dacb5d123004d3 (patch) | |
tree | 220cf5d8b8cbd88b498b4ae46e5f523cfb9449ab | |
parent | 1b6dd252e6c631322372c018ed546a108d9869d3 (diff) |
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: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
-rw-r--r-- | drivers/block/drbd/drbd_worker.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index eeda8b8e9d8e..377f27bbba17 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c | |||
@@ -134,8 +134,7 @@ static void drbd_endio_write_sec_final(struct drbd_peer_request *peer_req) __rel | |||
134 | 134 | ||
135 | spin_lock_irqsave(&mdev->tconn->req_lock, flags); | 135 | spin_lock_irqsave(&mdev->tconn->req_lock, flags); |
136 | mdev->writ_cnt += peer_req->i.size >> 9; | 136 | mdev->writ_cnt += peer_req->i.size >> 9; |
137 | list_del(&peer_req->w.list); /* has been on active_ee or sync_ee */ | 137 | list_move_tail(&peer_req->w.list, &mdev->done_ee); |
138 | list_add_tail(&peer_req->w.list, &mdev->done_ee); | ||
139 | 138 | ||
140 | /* | 139 | /* |
141 | * Do not remove from the write_requests tree here: we did not send the | 140 | * Do not remove from the write_requests tree here: we did not send the |