aboutsummaryrefslogtreecommitdiff
path: root/drivers/ide/ide-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r--drivers/ide/ide-io.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 696525342e9..5aed79ed458 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -1600,13 +1600,12 @@ int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t actio
rq->end_io = blk_end_sync_rq;
}
+ if (action == ide_preempt || action == ide_head_wait)
+ where = ELEVATOR_INSERT_FRONT;
+
spin_lock_irqsave(&ide_lock, flags);
if (action == ide_preempt)
hwgroup->rq = NULL;
- if (action == ide_preempt || action == ide_head_wait) {
- where = ELEVATOR_INSERT_FRONT;
- rq->cmd_flags |= REQ_PREEMPT;
- }
__elv_add_request(drive->queue, rq, where, 0);
ide_do_request(hwgroup, IDE_NO_IRQ);
spin_unlock_irqrestore(&ide_lock, flags);