Message ID | 20190111000858.76261-4-bvanassche@acm.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | sd patches for kernel v5.1 | expand |
On 1/11/19 1:08 AM, Bart Van Assche wrote: > This patch does not change any functionality. > > Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> > [ bvanassche: extracted this patch from a larger patch ] > Signed-off-by: Bart Van Assche <bvanassche@acm.org> > --- > drivers/scsi/sd.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c > index 289a0c8d0e82..7afcf8f7e342 100644 > --- a/drivers/scsi/sd.c > +++ b/drivers/scsi/sd.c > @@ -1016,7 +1016,6 @@ static blk_status_t sd_setup_write_same_cmnd(struct scsi_cmnd *cmd) > struct bio *bio = rq->bio; > sector_t sector = blk_rq_pos(rq); > unsigned int nr_sectors = blk_rq_sectors(rq); > - unsigned int nr_bytes = blk_rq_bytes(rq); > blk_status_t ret; > > if (sdkp->device->no_write_same) > @@ -1056,7 +1055,7 @@ static blk_status_t sd_setup_write_same_cmnd(struct scsi_cmnd *cmd) > */ > rq->__data_len = sdp->sector_size; > ret = scsi_init_io(cmd); > - rq->__data_len = nr_bytes; > + rq->__data_len = blk_rq_bytes(rq); > > return ret; > } > Reviewed-by: Hannes Reinecke <hare@suse.com> Cheers, Hannes
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 289a0c8d0e82..7afcf8f7e342 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1016,7 +1016,6 @@ static blk_status_t sd_setup_write_same_cmnd(struct scsi_cmnd *cmd) struct bio *bio = rq->bio; sector_t sector = blk_rq_pos(rq); unsigned int nr_sectors = blk_rq_sectors(rq); - unsigned int nr_bytes = blk_rq_bytes(rq); blk_status_t ret; if (sdkp->device->no_write_same) @@ -1056,7 +1055,7 @@ static blk_status_t sd_setup_write_same_cmnd(struct scsi_cmnd *cmd) */ rq->__data_len = sdp->sector_size; ret = scsi_init_io(cmd); - rq->__data_len = nr_bytes; + rq->__data_len = blk_rq_bytes(rq); return ret; }