iscsi-command.c: use pdu->expxferlen instead of pdu->expxferlen
Both are the same value at this point but it is better to do the computation only based on pdy-> fields. Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
@@ -326,7 +326,7 @@ iscsi_scsi_command_async(struct iscsi_context *iscsi, int lun,
|
|||||||
* subtract from first_burst_length.
|
* subtract from first_burst_length.
|
||||||
*/
|
*/
|
||||||
if (!(flags & ISCSI_PDU_SCSI_FINAL)) {
|
if (!(flags & ISCSI_PDU_SCSI_FINAL)) {
|
||||||
uint32_t len = task->expxferlen - pdu->payload_len;
|
uint32_t len = pdu->expxferlen - pdu->payload_len;
|
||||||
|
|
||||||
if (len > iscsi->first_burst_length) {
|
if (len > iscsi->first_burst_length) {
|
||||||
len = iscsi->first_burst_length;
|
len = iscsi->first_burst_length;
|
||||||
|
|||||||
Reference in New Issue
Block a user