Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45899
b: refs/heads/master
c: c0d4d57
h: refs/heads/master
i:
  45897: 1c612d9
  45895: eea13a7
v: v3
  • Loading branch information
Mike Christie authored and Linus Torvalds committed Jan 30, 2007
1 parent bcc81c1 commit a22be73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 87df7241bd547da5d4d4a4e5397866dfe422e439
refs/heads/master: c0d4d573feed199b16094c072e7cb07afb01c598
5 changes: 3 additions & 2 deletions trunk/block/scsi_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ static int verify_command(struct file *file, unsigned char *cmd)
static int sg_io(struct file *file, request_queue_t *q,
struct gendisk *bd_disk, struct sg_io_hdr *hdr)
{
unsigned long start_time;
unsigned long start_time, timeout;
int writing = 0, ret = 0;
struct request *rq;
char sense[SCSI_SENSE_BUFFERSIZE];
Expand Down Expand Up @@ -271,7 +271,8 @@ static int sg_io(struct file *file, request_queue_t *q,

rq->cmd_type = REQ_TYPE_BLOCK_PC;

rq->timeout = jiffies_to_msecs(hdr->timeout);
timeout = msecs_to_jiffies(hdr->timeout);
rq->timeout = (timeout < INT_MAX) ? timeout : INT_MAX;
if (!rq->timeout)
rq->timeout = q->sg_timeout;
if (!rq->timeout)
Expand Down

0 comments on commit a22be73

Please sign in to comment.