summaryrefslogtreecommitdiffstats
path: root/block/bsg.c
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2009-11-11 13:47:45 +0100
committerJens Axboe <jens.axboe@oracle.com>2009-11-11 13:47:45 +0100
commitad5ebd2fa2557b04a653bb3c3377a47da8f9b8e9 (patch)
treef70ba006e73db3450b468c3098d43fc2a392b1da /block/bsg.c
parent86b37281411cf1e9bc0a6b5406c45edb7bd9ea5d (diff)
downloadlinux-ad5ebd2fa2557b04a653bb3c3377a47da8f9b8e9.tar.bz2
block: jiffies fixes
Use HZ-independent calculation of milliseconds. Add jiffies.h where it was missing since functions or macros from it are used. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/bsg.c')
-rw-r--r--block/bsg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/bsg.c b/block/bsg.c
index 0676301f16d0..a9fd2d84b53a 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -15,6 +15,7 @@
#include <linux/blkdev.h>
#include <linux/poll.h>
#include <linux/cdev.h>
+#include <linux/jiffies.h>
#include <linux/percpu.h>
#include <linux/uio.h>
#include <linux/idr.h>
@@ -197,7 +198,7 @@ static int blk_fill_sgv4_hdr_rq(struct request_queue *q, struct request *rq,
rq->cmd_len = hdr->request_len;
rq->cmd_type = REQ_TYPE_BLOCK_PC;
- rq->timeout = (hdr->timeout * HZ) / 1000;
+ rq->timeout = msecs_to_jiffies(hdr->timeout);
if (!rq->timeout)
rq->timeout = q->sg_timeout;
if (!rq->timeout)