diff options
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r-- | drivers/ide/ide-disk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 37a8a907febe..05dbcce70b0e 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -522,7 +522,7 @@ static int ide_do_setfeature(ide_drive_t *drive, u8 feature, u8 nsect) | |||
522 | static void update_flush(ide_drive_t *drive) | 522 | static void update_flush(ide_drive_t *drive) |
523 | { | 523 | { |
524 | u16 *id = drive->id; | 524 | u16 *id = drive->id; |
525 | unsigned flush = 0; | 525 | bool wc = false; |
526 | 526 | ||
527 | if (drive->dev_flags & IDE_DFLAG_WCACHE) { | 527 | if (drive->dev_flags & IDE_DFLAG_WCACHE) { |
528 | unsigned long long capacity; | 528 | unsigned long long capacity; |
@@ -546,12 +546,12 @@ static void update_flush(ide_drive_t *drive) | |||
546 | drive->name, barrier ? "" : "not "); | 546 | drive->name, barrier ? "" : "not "); |
547 | 547 | ||
548 | if (barrier) { | 548 | if (barrier) { |
549 | flush = REQ_FLUSH; | 549 | wc = true; |
550 | blk_queue_prep_rq(drive->queue, idedisk_prep_fn); | 550 | blk_queue_prep_rq(drive->queue, idedisk_prep_fn); |
551 | } | 551 | } |
552 | } | 552 | } |
553 | 553 | ||
554 | blk_queue_flush(drive->queue, flush); | 554 | blk_queue_write_cache(drive->queue, wc, false); |
555 | } | 555 | } |
556 | 556 | ||
557 | ide_devset_get_flag(wcache, IDE_DFLAG_WCACHE); | 557 | ide_devset_get_flag(wcache, IDE_DFLAG_WCACHE); |