Message ID | 20190208212503.237150-5-bvanassche@acm.org (mailing list archive) |
---|---|
State | Mainlined |
Commit | 80f82c169b68b2dcd5adfc4625edd93a2ab954cf |
Headers | show |
Series | Reduce the size of the SCSI request data structure | expand |
On Fri, Feb 08, 2019 at 01:25:02PM -0800, Bart Van Assche wrote: > 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> Looks good, Reviewed-by: Christoph Hellwig <hch@lst.de>
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index d5f1f2ff523c..e1dc5b52f00c 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -844,7 +844,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); } @@ -876,7 +875,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); } @@ -908,7 +906,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); }
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> --- drivers/scsi/sd.c | 3 --- 1 file changed, 3 deletions(-)