Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sd: fix a bug in deriving the FLUSH_TIMEOUT from the basic I/O timeout

Commit ID: 7e660100d85af860e7ad763202fff717adcdaacd added code to derive the
FLUSH_TIMEOUT from the basic I/O timeout. However, this patch did not use the
basic I/O timeout of the device. Fix this bug.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>

authored by

K. Y. Srinivasan and committed by
Christoph Hellwig
26b9fd8b c1d40a52

+1 -1
+1 -1
drivers/scsi/sd.c
··· 880 880 cmd->transfersize = 0; 881 881 cmd->allowed = SD_MAX_RETRIES; 882 882 883 - rq->timeout *= SD_FLUSH_TIMEOUT_MULTIPLIER; 883 + rq->timeout = rq->q->rq_timeout * SD_FLUSH_TIMEOUT_MULTIPLIER; 884 884 return BLKPREP_OK; 885 885 } 886 886