diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-06-06 04:58:49 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-06-20 17:10:44 -0400 |
commit | b9da5826df3936671ea67bc33f6fc8c2020526b8 (patch) | |
tree | eecce0a859bf5048f8b9c683e4baf4cef2b62eaf | |
parent | b28e545c4ddd7b594c64e8f3d9c2891eda253afc (diff) |
iscsi-target: Avoid unnecessary t_state_lock during unsolicited data-out check
In modern iscsi-target code, the setup and I/O submission is done within a
single process context, so there is no need to acquire se_cmd->t_state_lock while
checking SCF_SUPPORTED_SAM_OPCODE for determining when unsolicited data-out
should be dumped.
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>
-rw-r--r-- | drivers/target/iscsi/iscsi_target.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index d7705e5824fb..cc43d4163adc 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c | |||
@@ -1277,7 +1277,6 @@ iscsit_check_dataout_hdr(struct iscsi_conn *conn, unsigned char *buf, | |||
1277 | struct iscsi_data *hdr = (struct iscsi_data *)buf; | 1277 | struct iscsi_data *hdr = (struct iscsi_data *)buf; |
1278 | struct iscsi_cmd *cmd = NULL; | 1278 | struct iscsi_cmd *cmd = NULL; |
1279 | struct se_cmd *se_cmd; | 1279 | struct se_cmd *se_cmd; |
1280 | unsigned long flags; | ||
1281 | u32 payload_length = ntoh24(hdr->dlength); | 1280 | u32 payload_length = ntoh24(hdr->dlength); |
1282 | int rc; | 1281 | int rc; |
1283 | 1282 | ||
@@ -1356,14 +1355,9 @@ iscsit_check_dataout_hdr(struct iscsi_conn *conn, unsigned char *buf, | |||
1356 | */ | 1355 | */ |
1357 | 1356 | ||
1358 | /* Something's amiss if we're not in WRITE_PENDING state... */ | 1357 | /* Something's amiss if we're not in WRITE_PENDING state... */ |
1359 | spin_lock_irqsave(&se_cmd->t_state_lock, flags); | ||
1360 | WARN_ON(se_cmd->t_state != TRANSPORT_WRITE_PENDING); | 1358 | WARN_ON(se_cmd->t_state != TRANSPORT_WRITE_PENDING); |
1361 | spin_unlock_irqrestore(&se_cmd->t_state_lock, flags); | ||
1362 | |||
1363 | spin_lock_irqsave(&se_cmd->t_state_lock, flags); | ||
1364 | if (!(se_cmd->se_cmd_flags & SCF_SUPPORTED_SAM_OPCODE)) | 1359 | if (!(se_cmd->se_cmd_flags & SCF_SUPPORTED_SAM_OPCODE)) |
1365 | dump_unsolicited_data = 1; | 1360 | dump_unsolicited_data = 1; |
1366 | spin_unlock_irqrestore(&se_cmd->t_state_lock, flags); | ||
1367 | 1361 | ||
1368 | if (dump_unsolicited_data) { | 1362 | if (dump_unsolicited_data) { |
1369 | /* | 1363 | /* |