diff options
author | Bart Van Assche <bvanassche@acm.org> | 2019-02-09 00:25:02 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-02-12 19:13:41 +0300 |
commit | 80f82c169b68b2dcd5adfc4625edd93a2ab954cf (patch) | |
tree | ccec8510bc625843a4a16544df465fb693bfb644 | |
parent | 229531be6918906e92da5647c755ee8205fc1d7f (diff) | |
download | linux-80f82c169b68b2dcd5adfc4625edd93a2ab954cf.tar.xz |
scsi: sd: Remove superfluous residual assignments
Since commit 26e85fcd15f6 ("[SCSI] sd: Permit merged discard requests";
kernel v3.10) sd_done() sets the residual not only for failed special
requests but also for special requests that succeeded. Hence remove the
code from functions called by sd_init_command() that sets the residual.
This patch does not change any functionality.
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>
-rw-r--r-- | drivers/scsi/sd.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index c124459041dc..cc175b78b366 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -843,7 +843,6 @@ static blk_status_t sd_setup_unmap_cmnd(struct scsi_cmnd *cmd) cmd->allowed = SD_MAX_RETRIES; cmd->transfersize = data_len; rq->timeout = SD_TIMEOUT; - scsi_req(rq)->resid_len = data_len; return scsi_init_io(cmd); } @@ -875,7 +874,6 @@ static blk_status_t sd_setup_write_same16_cmnd(struct scsi_cmnd *cmd, cmd->allowed = SD_MAX_RETRIES; cmd->transfersize = data_len; rq->timeout = unmap ? SD_TIMEOUT : SD_WRITE_SAME_TIMEOUT; - scsi_req(rq)->resid_len = data_len; return scsi_init_io(cmd); } @@ -907,7 +905,6 @@ static blk_status_t sd_setup_write_same10_cmnd(struct scsi_cmnd *cmd, cmd->allowed = SD_MAX_RETRIES; cmd->transfersize = data_len; rq->timeout = unmap ? SD_TIMEOUT : SD_WRITE_SAME_TIMEOUT; - scsi_req(rq)->resid_len = data_len; return scsi_init_io(cmd); } |