Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146974
b: refs/heads/master
c: 2eef33e
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jens Axboe committed Apr 28, 2009
1 parent b4016ac commit 14b3055
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 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: 10732f5661fb7adf62e20733b0030fc0fc93b0c4
refs/heads/master: 2eef33e439ba9ae387cdc3f1abcef2f3f6c4e7a8
22 changes: 9 additions & 13 deletions trunk/block/blk-timeout.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,8 @@ void blk_rq_timed_out_timer(unsigned long data)
if (blk_mark_rq_complete(rq))
continue;
blk_rq_timed_out(rq);
} else {
if (!next || time_after(next, rq->deadline))
next = rq->deadline;
}
} else if (!next || time_after(next, rq->deadline))
next = rq->deadline;
}

/*
Expand Down Expand Up @@ -176,16 +174,14 @@ void blk_add_timer(struct request *req)
BUG_ON(!list_empty(&req->timeout_list));
BUG_ON(test_bit(REQ_ATOM_COMPLETE, &req->atomic_flags));

if (req->timeout)
req->deadline = jiffies + req->timeout;
else {
req->deadline = jiffies + q->rq_timeout;
/*
* Some LLDs, like scsi, peek at the timeout to prevent
* a command from being retried forever.
*/
/*
* Some LLDs, like scsi, peek at the timeout to prevent a
* command from being retried forever.
*/
if (!req->timeout)
req->timeout = q->rq_timeout;
}

req->deadline = jiffies + req->timeout;
list_add_tail(&req->timeout_list, &q->timeout_list);

/*
Expand Down

0 comments on commit 14b3055

Please sign in to comment.