]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
scsi: target: core: Fix complete_type use
authorMike Christie <michael.christie@oracle.com>
Sat, 7 Mar 2026 22:06:30 +0000 (16:06 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 11 Mar 2026 01:32:01 +0000 (21:32 -0400)
There were two copy and paste type of errors where I swapped 'complete'
with 'submit' names. Use 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.

Fixes: 06933066d88a ("scsi: target: Add support for completing commands from backend context")
Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
[mnc: Fixed second instance]
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://patch.msgid.link/20260307220630.131008-1-michael.christie@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_device.c
drivers/target/target_core_transport.c

index fbc8ab65372ef4818a58e9d20c8e95b375b69ce4..9db2201aa553f1901ddf1bbcabf1936b27a0b2c4 100644 (file)
@@ -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;
index 34249fb80c678cae540881eebeffa4f1e0f72f4b..4e8d779dda5e259a1854d66e16828ac6e2c07bb4 100644 (file)
@@ -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