diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-12-29 14:27:31 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-12-29 14:27:31 -0500 |
commit | 3c8a2cce47c6813383c9e38134e31f7e5f72e9d8 (patch) | |
tree | 0779139e88629fe3434fbef6abdb43c78df0ce54 /drivers/ide/ide-io.c | |
parent | a72b2147ec9e77be68308ba06190603550d1cb61 (diff) |
ide: ide_lock + __blk_end_request() -> blk_end_request()
Use blk_end_request() instead of ide_lock + __blk_end_request()
in cdrom_end_request(), cdrom_newpc_intr(), __ide_end_request(),
ide_complete_pm_request() and ide_end_drive_cmd().
[ ide_lock is currently also used as queue lock ]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r-- | drivers/ide/ide-io.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 709163536015..4a6576f6146b 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -58,7 +58,6 @@ | |||
58 | static int __ide_end_request(ide_drive_t *drive, struct request *rq, | 58 | static int __ide_end_request(ide_drive_t *drive, struct request *rq, |
59 | int uptodate, unsigned int nr_bytes, int dequeue) | 59 | int uptodate, unsigned int nr_bytes, int dequeue) |
60 | { | 60 | { |
61 | unsigned long flags; | ||
62 | int ret = 1; | 61 | int ret = 1; |
63 | int error = 0; | 62 | int error = 0; |
64 | 63 | ||
@@ -85,10 +84,8 @@ static int __ide_end_request(ide_drive_t *drive, struct request *rq, | |||
85 | ide_dma_on(drive); | 84 | ide_dma_on(drive); |
86 | } | 85 | } |
87 | 86 | ||
88 | spin_lock_irqsave(&ide_lock, flags); | 87 | if (!blk_end_request(rq, error, nr_bytes)) |
89 | if (!__blk_end_request(rq, error, nr_bytes)) | ||
90 | ret = 0; | 88 | ret = 0; |
91 | spin_unlock_irqrestore(&ide_lock, flags); | ||
92 | 89 | ||
93 | if (ret == 0 && dequeue) | 90 | if (ret == 0 && dequeue) |
94 | drive->hwif->hwgroup->rq = NULL; | 91 | drive->hwif->hwgroup->rq = NULL; |
@@ -267,10 +264,8 @@ static void ide_complete_pm_request (ide_drive_t *drive, struct request *rq) | |||
267 | 264 | ||
268 | drive->hwif->hwgroup->rq = NULL; | 265 | drive->hwif->hwgroup->rq = NULL; |
269 | 266 | ||
270 | spin_lock_irqsave(&ide_lock, flags); | 267 | if (blk_end_request(rq, 0, 0)) |
271 | if (__blk_end_request(rq, 0, 0)) | ||
272 | BUG(); | 268 | BUG(); |
273 | spin_unlock_irqrestore(&ide_lock, flags); | ||
274 | } | 269 | } |
275 | 270 | ||
276 | /** | 271 | /** |
@@ -291,7 +286,6 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err) | |||
291 | { | 286 | { |
292 | ide_hwgroup_t *hwgroup = drive->hwif->hwgroup; | 287 | ide_hwgroup_t *hwgroup = drive->hwif->hwgroup; |
293 | struct request *rq = hwgroup->rq; | 288 | struct request *rq = hwgroup->rq; |
294 | unsigned long flags; | ||
295 | 289 | ||
296 | if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) { | 290 | if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) { |
297 | ide_task_t *task = (ide_task_t *)rq->special; | 291 | ide_task_t *task = (ide_task_t *)rq->special; |
@@ -323,11 +317,9 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err) | |||
323 | 317 | ||
324 | rq->errors = err; | 318 | rq->errors = err; |
325 | 319 | ||
326 | spin_lock_irqsave(&ide_lock, flags); | 320 | if (unlikely(blk_end_request(rq, (rq->errors ? -EIO : 0), |
327 | if (unlikely(__blk_end_request(rq, (rq->errors ? -EIO : 0), | 321 | blk_rq_bytes(rq)))) |
328 | blk_rq_bytes(rq)))) | ||
329 | BUG(); | 322 | BUG(); |
330 | spin_unlock_irqrestore(&ide_lock, flags); | ||
331 | } | 323 | } |
332 | EXPORT_SYMBOL(ide_end_drive_cmd); | 324 | EXPORT_SYMBOL(ide_end_drive_cmd); |
333 | 325 | ||