Skip to content

Commit

Permalink
scsi: qla2xxx: Use list_move_tail() instead of list_del()/list_add_ta…
Browse files Browse the repository at this point in the history
…il()

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

Link: https://lore.kernel.org/r/[email protected]
Reported-by: Hulk Robot <[email protected]>
Reviewed-by: Himanshu Madhani <[email protected]>
Signed-off-by: Baokun Li <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
LiBaokun96 authored and martinkpetersen committed Jun 16, 2021
1 parent de48898 commit b6e7fba
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/scsi/qla2xxx/qla_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
Expand Down

0 comments on commit b6e7fba

Please sign in to comment.