diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2009-11-11 07:47:45 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-11-11 07:47:45 -0500 |
commit | ad5ebd2fa2557b04a653bb3c3377a47da8f9b8e9 (patch) | |
tree | f70ba006e73db3450b468c3098d43fc2a392b1da /block/bsg.c | |
parent | 86b37281411cf1e9bc0a6b5406c45edb7bd9ea5d (diff) |
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.c | 3 |
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 @@ | |||
15 | #include <linux/blkdev.h> | 15 | #include <linux/blkdev.h> |
16 | #include <linux/poll.h> | 16 | #include <linux/poll.h> |
17 | #include <linux/cdev.h> | 17 | #include <linux/cdev.h> |
18 | #include <linux/jiffies.h> | ||
18 | #include <linux/percpu.h> | 19 | #include <linux/percpu.h> |
19 | #include <linux/uio.h> | 20 | #include <linux/uio.h> |
20 | #include <linux/idr.h> | 21 | #include <linux/idr.h> |
@@ -197,7 +198,7 @@ static int blk_fill_sgv4_hdr_rq(struct request_queue *q, struct request *rq, | |||
197 | rq->cmd_len = hdr->request_len; | 198 | rq->cmd_len = hdr->request_len; |
198 | rq->cmd_type = REQ_TYPE_BLOCK_PC; | 199 | rq->cmd_type = REQ_TYPE_BLOCK_PC; |
199 | 200 | ||
200 | rq->timeout = (hdr->timeout * HZ) / 1000; | 201 | rq->timeout = msecs_to_jiffies(hdr->timeout); |
201 | if (!rq->timeout) | 202 | if (!rq->timeout) |
202 | rq->timeout = q->sg_timeout; | 203 | rq->timeout = q->sg_timeout; |
203 | if (!rq->timeout) | 204 | if (!rq->timeout) |