Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143965
b: refs/heads/master
c: 4d00aa4
h: refs/heads/master
i:
  143963: 81ab4f0
v: v3
  • Loading branch information
Jeff Moyer authored and Jens Axboe committed Apr 22, 2009
1 parent 05afa05 commit e4efc21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 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: b759113499d6c7cb75fab04f56772579308bc0f8
refs/heads/master: 4d00aa47e2337dcfe2d8a7215dbde3765b507167
4 changes: 3 additions & 1 deletion trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1908,7 +1908,9 @@ cfq_update_io_seektime(struct cfq_data *cfqd, struct cfq_io_context *cic,
sector_t sdist;
u64 total;

if (cic->last_request_pos < rq->sector)
if (!cic->last_request_pos)
sdist = 0;
else if (cic->last_request_pos < rq->sector)
sdist = rq->sector - cic->last_request_pos;
else
sdist = cic->last_request_pos - rq->sector;
Expand Down

0 comments on commit e4efc21

Please sign in to comment.