int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq, int uptodate, int nr_sectors) { BUG_ON(!blk_rq_started(rq)); return __ide_end_request(drive, rq, uptodate, nr_sectors << 9, 0); }
int ide_end_request (ide_drive_t *drive, int uptodate, int nr_sectors) { unsigned int nr_bytes = nr_sectors << 9; struct request *rq; unsigned long flags; int ret = 1; /* * room for locking improvements here, the calls below don't * need the queue lock held at all */ spin_lock_irqsave(&ide_lock, flags); rq = HWGROUP(drive)->rq; if (!nr_bytes) { if (blk_pc_request(rq)) nr_bytes = rq->data_len; else nr_bytes = rq->hard_cur_sectors << 9; } ret = __ide_end_request(drive, rq, uptodate, nr_bytes, 1); spin_unlock_irqrestore(&ide_lock, flags); return ret; }
int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq, int uptodate, int nr_sectors) { unsigned long flags; int ret; spin_lock_irqsave(&ide_lock, flags); BUG_ON(!blk_rq_started(rq)); ret = __ide_end_request(drive, rq, uptodate, nr_sectors << 9, 0); spin_unlock_irqrestore(&ide_lock, flags); return ret; }
int ide_end_request (ide_drive_t *drive, int uptodate, int nr_sectors) { unsigned int nr_bytes = nr_sectors << 9; struct request *rq = drive->hwif->rq; if (!nr_bytes) { if (blk_pc_request(rq)) nr_bytes = rq->data_len; else nr_bytes = rq->hard_cur_sectors << 9; } return __ide_end_request(drive, rq, uptodate, nr_bytes, 1); }
int ide_end_request (ide_drive_t *drive, int uptodate, int nr_sectors) { struct request *rq; unsigned long flags; int ret = 1; spin_lock_irqsave(&ide_lock, flags); rq = HWGROUP(drive)->rq; if (!nr_sectors) nr_sectors = rq->hard_cur_sectors; if (blk_complete_barrier_rq_locked(drive->queue, rq, nr_sectors)) ret = rq->nr_sectors != 0; else ret = __ide_end_request(drive, rq, uptodate, nr_sectors); spin_unlock_irqrestore(&ide_lock, flags); return ret; }