Skip to content

Commit b28e545

Browse files
author
Nicholas Bellinger
committed
target: Drop unnecessary t_state_lock access for SCF_SUPPORTED_SAM_OPCODE assignment
This patch drops the se_cmd->t_state_lock access around SCF_SUPPORTED_SAM_OPCODE assignment within target_setup_cmd_from_cdb(). Original v4.0 target code required this as fabrics would be checking for this values in different process contexts for setup and I/O submission. Given that modern v4.1 target code performs setup and I/O submission from the same process context, this t_state_lock access is no longer required. Cc: Christoph Hellwig <hch@lst.de> Cc: Roland Dreier <roland@kernel.org> Cc: Kent Overstreet <koverstreet@google.com> Cc: Or Gerlitz <ogerlitz@mellanox.com> Cc: Moussa Ba <moussaba@micron.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
1 parent 1a398b9 commit b28e545

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

‎drivers/target/target_core_transport.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,6 @@ sense_reason_t
10891089
target_setup_cmd_from_cdb(struct se_cmd *cmd, unsigned char *cdb)
10901090
{
10911091
struct se_device *dev = cmd->se_dev;
1092-
unsigned long flags;
10931092
sense_reason_t ret;
10941093

10951094
/*
@@ -1149,9 +1148,7 @@ target_setup_cmd_from_cdb(struct se_cmd *cmd, unsigned char *cdb)
11491148
if (ret)
11501149
return ret;
11511150

1152-
spin_lock_irqsave(&cmd->t_state_lock, flags);
11531151
cmd->se_cmd_flags |= SCF_SUPPORTED_SAM_OPCODE;
1154-
spin_unlock_irqrestore(&cmd->t_state_lock, flags);
11551152

11561153
spin_lock(&cmd->se_lun->lun_sep_lock);
11571154
if (cmd->se_lun->lun_sep)

0 commit comments

Comments
 (0)