Skip to content

Commit 0352c3d

Browse files
Roman Bolshakovmartinkpetersen
authored andcommitted
scsi: target: iscsi: Fix zero tag inside a trace event
target_sequencer_start event is triggered inside target_cmd_init_cdb(). se_cmd.tag is not initialized with ITT at the moment so the event always prints zero tag. Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] # 5.10+ Reviewed-by: Mike Christie <[email protected]> Signed-off-by: Roman Bolshakov <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 65df7d1 commit 0352c3d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/target/iscsi/iscsi_target.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,7 @@ int iscsit_setup_scsi_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
11661166

11671167
target_get_sess_cmd(&cmd->se_cmd, true);
11681168

1169+
cmd->se_cmd.tag = (__force u32)cmd->init_task_tag;
11691170
cmd->sense_reason = target_cmd_init_cdb(&cmd->se_cmd, hdr->cdb);
11701171
if (cmd->sense_reason) {
11711172
if (cmd->sense_reason == TCM_OUT_OF_RESOURCES) {
@@ -1180,8 +1181,6 @@ int iscsit_setup_scsi_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
11801181
if (cmd->sense_reason)
11811182
goto attach_cmd;
11821183

1183-
/* only used for printks or comparing with ->ref_task_tag */
1184-
cmd->se_cmd.tag = (__force u32)cmd->init_task_tag;
11851184
cmd->sense_reason = target_cmd_parse_cdb(&cmd->se_cmd);
11861185
if (cmd->sense_reason)
11871186
goto attach_cmd;

0 commit comments

Comments
 (0)