Convert jiffies to msecs in scsi_ioctl()
Subsystems (3)
PATCH 1/1 Convert jiffies to msecs in scsi_ioctl()
Hi all,
The attached patch fixes the conversion from jiffies to msecs inscsi_ioctl(). The current code works if HZ=1000, but will lead to incorrect timeout settings for other values.
Please apply.
Cheers,
Hannes
Signature · 4 lines
Dr. Hannes Reinecke [email protected] SuSE Linux Products GmbH S390 & zSeries Maxfeldstraße 5 +49 911 74053 688 90409 Nürnberg http://www.suse.de
Fix conversion from jiffies to msecs for sg_io()
Use the proper conversion function for convert jiffies to msecs in sg_io().
Signed-off-by Hannes Reinecke <[email protected]>
block/scsi_ioctl.c +1 -1
@@ -304,7 +304,7 @@ static int sg_io(struct file *file, requif (rq->bio)blk_queue_bounce (q, &rq->bio); - rq->timeout = (hdr->timeout *HZ ) /1000 ; + rq->timeout =jiffies_to_msecs (hdr->timeout);if (!rq->timeout) rq->timeout = q->sg_timeout;if (!rq->timeout)