aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-09-05 02:42:48 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-09-17 20:13:36 -0400
commitbf11eefcb1dc1326341ebdc44566ad08bee3f539 (patch)
tree7e82aa014d6f7b7ee56da368e63596fd1e062ce6
parent06cda529d27d778f55690d5b09af8ae4448e796b (diff)
target: 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: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r--drivers/target/sbp/sbp_target.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c
index 4d9797744637..0ce44cd3488e 100644
--- a/drivers/target/sbp/sbp_target.c
+++ b/drivers/target/sbp/sbp_target.c
@@ -660,8 +660,7 @@ static void session_reconnect_expired(struct sbp_session *sess)
660 spin_lock_bh(&sess->lock); 660 spin_lock_bh(&sess->lock);
661 list_for_each_entry_safe(login, temp, &sess->login_list, link) { 661 list_for_each_entry_safe(login, temp, &sess->login_list, link) {
662 login->sess = NULL; 662 login->sess = NULL;
663 list_del(&login->link); 663 list_move_tail(&login->link, &login_list);
664 list_add_tail(&login->link, &login_list);
665 } 664 }
666 spin_unlock_bh(&sess->lock); 665 spin_unlock_bh(&sess->lock);
667 666