Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKernel Build Daemon <kbuild@suse.de>2019-09-09 07:02:19 +0200
committerKernel Build Daemon <kbuild@suse.de>2019-09-09 07:02:19 +0200
commit2ead956d5ce172faab449578cb1f81a5b34f9cc2 (patch)
tree4267886aa15271b7b4b7a762d73e17b70c39c6c9
parentc0e1759b00837b5aa9ef5b5c2fda27e1d061a865 (diff)
parent3ed72dea1a4fe4895e59d421f9fa25c5f564ab30 (diff)
Merge branch 'SLE15' into SLE15-AZURE
-rw-r--r--drivers/scsi/sd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 88f8ea86b5a2..bf34425ae850 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -3120,6 +3120,9 @@ static bool sd_validate_opt_xfer_size(struct scsi_disk *sdkp,
unsigned int opt_xfer_bytes =
logical_to_bytes(sdp, sdkp->opt_xfer_blocks);
+ if (sdkp->opt_xfer_blocks == 0)
+ return false;
+
if (sdkp->opt_xfer_blocks > dev_max) {
sd_first_printk(KERN_WARNING, sdkp,
"Optimal transfer size %u logical blocks " \