scsi: target: Fix complete_type use
Subsystems (2)
PATCH 1/1 scsi: target: Fix complete_type use
There were two copy and paste type of errors where I swapped complete with submit names. This patch uses the correct variables and definitions.
This problem was found by Dmitry Bogdanov and this patch builds on top of his patch to fix a second instance that was found.
--- drivers/target/target_core_device.c | 2 +- drivers/target/target_core_transport.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/target/target_core_device.c +1 -1
@@ -813,7 +813,7 @@ struct se_device *target_alloc_device(struct se_hba *hba, const char *name)DA_UNMAP_ZEROES_DATA_DEFAULT ; dev->dev_attrib.max_write_same_len =DA_MAX_WRITE_SAME_LEN ; dev->dev_attrib.submit_type =TARGET_FABRIC_DEFAULT_SUBMIT ; - dev->dev_attrib.submit_type =TARGET_FABRIC_DEFAULT_COMPL ; + dev->dev_attrib.complete_type =TARGET_FABRIC_DEFAULT_COMPL ;/* Skip allocating lun_stats since we can't export them. */ xcopy_lun = &dev->xcopy_lun;
drivers/target/target_core_transport.c +1 -1
@@ -917,7 +917,7 @@ static void target_complete(struct se_cmd *cmd, int success) da = &cmd->se_dev->dev_attrib;if (da->complete_type ==TARGET_FABRIC_DEFAULT_COMPL ) compl_type = wwn->wwn_tf->tf_ops->default_compl_type; -else if (da->complete_type ==TARGET_DIRECT_SUBMIT && +else if (da->complete_type ==TARGET_DIRECT_COMPL && wwn->wwn_tf->tf_ops->direct_compl_supp) compl_type =TARGET_DIRECT_COMPL ;else
Signature · 1 line
2.43.0
Martin K. Petersen
AppliedMike,
Quoted 3 lines
There were two copy and paste type of errors where I swapped complete with submit names. This patch uses the correct variables and definitions.
Applied to 7.1/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen
Martin K. Petersen
AppliedQuoted 8 lines · Mike Christie
There were two copy and paste type of errors where I swapped complete with submit names. This patch uses the correct variables and definitions.
This problem was found by Dmitry Bogdanov and this patch builds on top of his patch to fix a second instance that was found.
[...]
Applied to 7.1/scsi-queue, thanks!
[1/1] scsi: target: Fix complete_type use
https://git.kernel.org/mkp/scsi/c/3e70441fb508
Signature · 1 line
Martin K. Petersen