struct request *failed = (struct request *) rq->buffer;
struct cdrom_info *info = drive->driver_data;
void *sense = &info->sense_data;
- unsigned long flags;
if (failed) {
if (failed->sense) {
failed->hard_nr_sectors))
BUG();
} else {
- spin_lock_irqsave(&ide_lock, flags);
- if (__blk_end_request(failed, -EIO,
- failed->data_len))
+ if (blk_end_request(failed, -EIO,
+ failed->data_len))
BUG();
- spin_unlock_irqrestore(&ide_lock, flags);
}
} else
cdrom_analyze_sense_data(drive, NULL, sense);
end_request:
if (blk_pc_request(rq)) {
- unsigned long flags;
unsigned int dlen = rq->data_len;
if (dma)
rq->data_len = 0;
- spin_lock_irqsave(&ide_lock, flags);
- if (__blk_end_request(rq, 0, dlen))
+ if (blk_end_request(rq, 0, dlen))
BUG();
- spin_unlock_irqrestore(&ide_lock, flags);
hwgroup->rq = NULL;
} else {
static int __ide_end_request(ide_drive_t *drive, struct request *rq,
int uptodate, unsigned int nr_bytes, int dequeue)
{
- unsigned long flags;
int ret = 1;
int error = 0;
ide_dma_on(drive);
}
- spin_lock_irqsave(&ide_lock, flags);
- if (!__blk_end_request(rq, error, nr_bytes))
+ if (!blk_end_request(rq, error, nr_bytes))
ret = 0;
- spin_unlock_irqrestore(&ide_lock, flags);
if (ret == 0 && dequeue)
drive->hwif->hwgroup->rq = NULL;
drive->hwif->hwgroup->rq = NULL;
- spin_lock_irqsave(&ide_lock, flags);
- if (__blk_end_request(rq, 0, 0))
+ if (blk_end_request(rq, 0, 0))
BUG();
- spin_unlock_irqrestore(&ide_lock, flags);
}
/**
{
ide_hwgroup_t *hwgroup = drive->hwif->hwgroup;
struct request *rq = hwgroup->rq;
- unsigned long flags;
if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) {
ide_task_t *task = (ide_task_t *)rq->special;
rq->errors = err;
- spin_lock_irqsave(&ide_lock, flags);
- if (unlikely(__blk_end_request(rq, (rq->errors ? -EIO : 0),
- blk_rq_bytes(rq))))
+ if (unlikely(blk_end_request(rq, (rq->errors ? -EIO : 0),
+ blk_rq_bytes(rq))))
BUG();
- spin_unlock_irqrestore(&ide_lock, flags);
}
EXPORT_SYMBOL(ide_end_drive_cmd);