Skip to content

Commit 1494155

Browse files
ssudhakarpmartinkpetersen
authored andcommitted
scsi: target: Fix lun lookup for TARGET_SCF_LOOKUP_LUN_FROM_TAG case
transport_lookup_tmr_lun() uses "orig_fe_lun" member of struct se_cmd for the lookup. Hence, update this field directly for the TARGET_SCF_LOOKUP_LUN_FROM_TAG case. Link: https://lore.kernel.org/r/1600300471-26135-1-git-send-email-sudhakar.panneerselvam@oracle.com Fixes: a36840d ("target: Initialize LUN in transport_init_se_cmd()") Reported-by: Martin Wilck <mwilck@suse.com> Reviewed-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 6c5dee1 commit 1494155

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/target/target_core_transport.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1840,7 +1840,8 @@ int target_submit_tmr(struct se_cmd *se_cmd, struct se_session *se_sess,
18401840
* out unpacked_lun for the original se_cmd.
18411841
*/
18421842
if (tm_type == TMR_ABORT_TASK && (flags & TARGET_SCF_LOOKUP_LUN_FROM_TAG)) {
1843-
if (!target_lookup_lun_from_tag(se_sess, tag, &unpacked_lun))
1843+
if (!target_lookup_lun_from_tag(se_sess, tag,
1844+
&se_cmd->orig_fe_lun))
18441845
goto failure;
18451846
}
18461847

0 commit comments

Comments
 (0)