aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-io.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 15:21:41 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 15:21:41 -0400
commite8a96aa71355edef9f40ce01459acf25c50cb78c (patch)
treebb9ffe53be3405e4df9e38c815999c77202b8a88 /drivers/ide/ide-io.c
parent5d0cc8ae29b310ceb6516a6840ca22738aab7820 (diff)
ide: set REQ_PREEMPT request flag in ide_do_drive_cmd() users
* Set REQ_PREEMPT request flag in ide_do_drive_cmd() users for ide_preempt and ide_head_wait action types. * Remove setting REQ_PREEMPT from ide_do_drive_cmd(). While at it: * Set 'where' variable outside ide_lock. This is a preparation for converting IDE to use blk_execute_rq(). There should be no functional changes caused by this patch. Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Borislav Petkov <petkovbb@gmail.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
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 696525342e9a..5aed79ed4586 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
1600 rq->end_io = blk_end_sync_rq; 1600 rq->end_io = blk_end_sync_rq;
1601 } 1601 }
1602 1602
1603 if (action == ide_preempt || action == ide_head_wait)
1604 where = ELEVATOR_INSERT_FRONT;
1605
1603 spin_lock_irqsave(&ide_lock, flags); 1606 spin_lock_irqsave(&ide_lock, flags);
1604 if (action == ide_preempt) 1607 if (action == ide_preempt)
1605 hwgroup->rq = NULL; 1608 hwgroup->rq = NULL;
1606 if (action == ide_preempt || action == ide_head_wait) {
1607 where = ELEVATOR_INSERT_FRONT;
1608 rq->cmd_flags |= REQ_PREEMPT;
1609 }
1610 __elv_add_request(drive->queue, rq, where, 0); 1609 __elv_add_request(drive->queue, rq, where, 0);
1611 ide_do_request(hwgroup, IDE_NO_IRQ); 1610 ide_do_request(hwgroup, IDE_NO_IRQ);
1612 spin_unlock_irqrestore(&ide_lock, flags); 1611 spin_unlock_irqrestore(&ide_lock, flags);