Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38026
b: refs/heads/master
c: ce42f19
h: refs/heads/master
v: v3
  • Loading branch information
Hua Zhong authored and Linus Torvalds committed Oct 3, 2006
1 parent e286a5c commit 8dcc371
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: dc844e05913b84d09e86d88c0f861ef0afbee2fd
refs/heads/master: ce42f19137225d01be9388a73703df40fb7af80f
9 changes: 6 additions & 3 deletions trunk/drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ static int __ide_end_request(ide_drive_t *drive, struct request *rq,
{
int ret = 1;

BUG_ON(!blk_rq_started(rq));

/*
* if failfast is set on a request, override number of sectors and
* complete the whole request right now
Expand All @@ -82,7 +80,8 @@ static int __ide_end_request(ide_drive_t *drive, struct request *rq,

if (!end_that_request_first(rq, uptodate, nr_sectors)) {
add_disk_randomness(rq->rq_disk);
blkdev_dequeue_request(rq);
if (!list_empty(&rq->queuelist))
blkdev_dequeue_request(rq);
HWGROUP(drive)->rq = NULL;
end_that_request_last(rq, uptodate);
ret = 0;
Expand Down Expand Up @@ -1346,6 +1345,10 @@ static ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error)
* make sure request is sane
*/
rq = HWGROUP(drive)->rq;

if (!rq)
goto out;

HWGROUP(drive)->rq = NULL;

rq->errors = 0;
Expand Down

0 comments on commit 8dcc371

Please sign in to comment.