diff options
author | Andy Grover <agrover@redhat.com> | 2012-04-03 18:51:24 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-04-14 20:40:38 -0400 |
commit | ebf1d95ca297a06fe760177b614646dcec06abef (patch) | |
tree | 6ee7e2c5934ff0e7cd7e30b1e02590d0b4145406 /drivers/target/iscsi/iscsi_target_util.c | |
parent | 065ca1e42ffd74dd03cf60f61cead35934c91ed5 (diff) |
target/iscsi: Eliminate iscsi_cmd.data_length
Redundant, just use iscsi_cmd->se_cmd.data_length once se_cmd is
initialized, or hdr->data_length before then.
Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_util.c')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c index 66a6e9ba86fe..1f5a456f26b4 100644 --- a/drivers/target/iscsi/iscsi_target_util.c +++ b/drivers/target/iscsi/iscsi_target_util.c | |||
@@ -379,14 +379,14 @@ int iscsit_check_unsolicited_dataout(struct iscsi_cmd *cmd, unsigned char *buf) | |||
379 | if (!(hdr->flags & ISCSI_FLAG_CMD_FINAL)) | 379 | if (!(hdr->flags & ISCSI_FLAG_CMD_FINAL)) |
380 | return 0; | 380 | return 0; |
381 | 381 | ||
382 | if (((cmd->first_burst_len + payload_length) != cmd->data_length) && | 382 | if (((cmd->first_burst_len + payload_length) != cmd->se_cmd.data_length) && |
383 | ((cmd->first_burst_len + payload_length) != | 383 | ((cmd->first_burst_len + payload_length) != |
384 | conn->sess->sess_ops->FirstBurstLength)) { | 384 | conn->sess->sess_ops->FirstBurstLength)) { |
385 | pr_err("Unsolicited non-immediate data received %u" | 385 | pr_err("Unsolicited non-immediate data received %u" |
386 | " does not equal FirstBurstLength: %u, and does" | 386 | " does not equal FirstBurstLength: %u, and does" |
387 | " not equal ExpXferLen %u.\n", | 387 | " not equal ExpXferLen %u.\n", |
388 | (cmd->first_burst_len + payload_length), | 388 | (cmd->first_burst_len + payload_length), |
389 | conn->sess->sess_ops->FirstBurstLength, cmd->data_length); | 389 | conn->sess->sess_ops->FirstBurstLength, cmd->se_cmd.data_length); |
390 | transport_send_check_condition_and_sense(se_cmd, | 390 | transport_send_check_condition_and_sense(se_cmd, |
391 | TCM_INCORRECT_AMOUNT_OF_DATA, 0); | 391 | TCM_INCORRECT_AMOUNT_OF_DATA, 0); |
392 | return -1; | 392 | return -1; |