diff options
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r-- | drivers/ide/ide-io.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index ecfafcdafea4..b5dc6df8e67d 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -89,7 +89,7 @@ int __ide_end_request(ide_drive_t *drive, struct request *rq, int uptodate, | |||
89 | 89 | ||
90 | blkdev_dequeue_request(rq); | 90 | blkdev_dequeue_request(rq); |
91 | HWGROUP(drive)->rq = NULL; | 91 | HWGROUP(drive)->rq = NULL; |
92 | end_that_request_last(rq); | 92 | end_that_request_last(rq, uptodate); |
93 | ret = 0; | 93 | ret = 0; |
94 | } | 94 | } |
95 | return ret; | 95 | return ret; |
@@ -119,10 +119,7 @@ int ide_end_request (ide_drive_t *drive, int uptodate, int nr_sectors) | |||
119 | if (!nr_sectors) | 119 | if (!nr_sectors) |
120 | nr_sectors = rq->hard_cur_sectors; | 120 | nr_sectors = rq->hard_cur_sectors; |
121 | 121 | ||
122 | if (blk_complete_barrier_rq_locked(drive->queue, rq, nr_sectors)) | 122 | ret = __ide_end_request(drive, rq, uptodate, nr_sectors); |
123 | ret = rq->nr_sectors != 0; | ||
124 | else | ||
125 | ret = __ide_end_request(drive, rq, uptodate, nr_sectors); | ||
126 | 123 | ||
127 | spin_unlock_irqrestore(&ide_lock, flags); | 124 | spin_unlock_irqrestore(&ide_lock, flags); |
128 | return ret; | 125 | return ret; |
@@ -247,7 +244,7 @@ static void ide_complete_pm_request (ide_drive_t *drive, struct request *rq) | |||
247 | } | 244 | } |
248 | blkdev_dequeue_request(rq); | 245 | blkdev_dequeue_request(rq); |
249 | HWGROUP(drive)->rq = NULL; | 246 | HWGROUP(drive)->rq = NULL; |
250 | end_that_request_last(rq); | 247 | end_that_request_last(rq, 1); |
251 | spin_unlock_irqrestore(&ide_lock, flags); | 248 | spin_unlock_irqrestore(&ide_lock, flags); |
252 | } | 249 | } |
253 | 250 | ||
@@ -379,7 +376,7 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err) | |||
379 | blkdev_dequeue_request(rq); | 376 | blkdev_dequeue_request(rq); |
380 | HWGROUP(drive)->rq = NULL; | 377 | HWGROUP(drive)->rq = NULL; |
381 | rq->errors = err; | 378 | rq->errors = err; |
382 | end_that_request_last(rq); | 379 | end_that_request_last(rq, !rq->errors); |
383 | spin_unlock_irqrestore(&ide_lock, flags); | 380 | spin_unlock_irqrestore(&ide_lock, flags); |
384 | } | 381 | } |
385 | 382 | ||