diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 7d868d37ab5f..345b18d52ec6 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1969,9 +1969,13 @@ static int sd_done(struct scsi_cmnd *SCpnt) } break; case REQ_OP_ZONE_REPORT: + /* To avoid that the block layer performs an incorrect + * bio_advance() call and restart of the remainder of + * incomplete report zone BIOs, always indicate a full + * completion of REQ_OP_ZONE_REPORT. + */ if (!result) { - good_bytes = scsi_bufflen(SCpnt) - - scsi_get_resid(SCpnt); + good_bytes = scsi_bufflen(SCpnt); scsi_set_resid(SCpnt, 0); } else { good_bytes = 0;