aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/iscsi/iscsi_target_configfs.c5
-rw-r--r--drivers/target/iscsi/iscsi_target_device.c6
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c
index 1eec37c47662..fde3624dce7e 100644
--- a/drivers/target/iscsi/iscsi_target_configfs.c
+++ b/drivers/target/iscsi/iscsi_target_configfs.c
@@ -1790,6 +1790,11 @@ static int lio_queue_status(struct se_cmd *se_cmd)
1790 struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd); 1790 struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd);
1791 1791
1792 cmd->i_state = ISTATE_SEND_STATUS; 1792 cmd->i_state = ISTATE_SEND_STATUS;
1793
1794 if (cmd->se_cmd.scsi_status || cmd->sense_reason) {
1795 iscsit_add_cmd_to_response_queue(cmd, cmd->conn, cmd->i_state);
1796 return 0;
1797 }
1793 cmd->conn->conn_transport->iscsit_queue_status(cmd->conn, cmd); 1798 cmd->conn->conn_transport->iscsit_queue_status(cmd->conn, cmd);
1794 1799
1795 return 0; 1800 return 0;
diff --git a/drivers/target/iscsi/iscsi_target_device.c b/drivers/target/iscsi/iscsi_target_device.c
index 6c7a5104a4cd..7087c736daa5 100644
--- a/drivers/target/iscsi/iscsi_target_device.c
+++ b/drivers/target/iscsi/iscsi_target_device.c
@@ -58,11 +58,7 @@ void iscsit_increment_maxcmdsn(struct iscsi_cmd *cmd, struct iscsi_session *sess
58 58
59 cmd->maxcmdsn_inc = 1; 59 cmd->maxcmdsn_inc = 1;
60 60
61 if (!mutex_trylock(&sess->cmdsn_mutex)) { 61 mutex_lock(&sess->cmdsn_mutex);
62 sess->max_cmd_sn += 1;
63 pr_debug("Updated MaxCmdSN to 0x%08x\n", sess->max_cmd_sn);
64 return;
65 }
66 sess->max_cmd_sn += 1; 62 sess->max_cmd_sn += 1;
67 pr_debug("Updated MaxCmdSN to 0x%08x\n", sess->max_cmd_sn); 63 pr_debug("Updated MaxCmdSN to 0x%08x\n", sess->max_cmd_sn);
68 mutex_unlock(&sess->cmdsn_mutex); 64 mutex_unlock(&sess->cmdsn_mutex);