scsi: qla2xxx: Use list_move_tail() instead of list_del()/list_add_tail()

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

Link: https://lore.kernel.org/r/20210609072321.1356896-1-libaokun1@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Baokun Li 2021-06-09 15:23:21 +08:00 committed by Martin K. Petersen
parent de48898d0c
commit b6e7fba0c9
1 changed files with 1 additions and 2 deletions

View File

@ -5479,8 +5479,7 @@ qlt_free_qfull_cmds(struct qla_qpair *qpair)
"%s: Unexpected cmd in QFull list %p\n", __func__,
cmd);
list_del(&cmd->cmd_list);
list_add_tail(&cmd->cmd_list, &free_list);
list_move_tail(&cmd->cmd_list, &free_list);
/* piggy back on hardware_lock for protection */
vha->hw->tgt.num_qfull_cmds_alloc--;