scsi: ibmvscsis: Use list_move_tail instead of list_del/list_add_tail
authorWei Yongjun <weiyj.lk@gmail.com>
Fri, 22 Jul 2016 14:03:46 +0000 (14:03 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 31 Aug 2016 04:22:33 +0000 (00:22 -0400)
Using list_move_tail() instead of list_del() + list_add_tail().

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c

index b29fef9..7e873a7 100644 (file)
@@ -3697,8 +3697,7 @@ static void ibmvscsis_release_cmd(struct se_cmd *se_cmd)
 
        spin_lock_bh(&vscsi->intr_lock);
        /* Remove from active_q */
-       list_del(&cmd->list);
-       list_add_tail(&cmd->list, &vscsi->waiting_rsp);
+       list_move_tail(&cmd->list, &vscsi->waiting_rsp);
        ibmvscsis_send_messages(vscsi);
        spin_unlock_bh(&vscsi->intr_lock);
 }