scsi: libiscsi: Use scsi_[gs]et_resid() where appropriate
authorBart Van Assche <bvanassche@acm.org>
Fri, 8 Feb 2019 21:24:59 +0000 (13:24 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 12 Feb 2019 16:13:41 +0000 (11:13 -0500)
This patch does not change any functionality.

Cc: Lee Duncan <lduncan@suse.com>
Cc: Chris Leech <cleech@redhat.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libiscsi.c

index bca3a8636c2708c3a9c4c0a92673d73d71566274..dd314d2b111125a2ef859f993886d03eccbd917b 100644 (file)
@@ -915,7 +915,7 @@ iscsi_data_in_rsp(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
                if (res_count > 0 &&
                    (rhdr->flags & ISCSI_FLAG_CMD_OVERFLOW ||
                     res_count <= sc->sdb.length))
-                       sc->sdb.resid = res_count;
+                       scsi_set_resid(sc, res_count);
                else
                        sc->result = (DID_BAD_TARGET << 16) | rhdr->cmd_status;
        }