summaryrefslogtreecommitdiff
path: root/drivers/ide
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2016-03-30 10:16:25 -0600
committerJens Axboe <axboe@fb.com>2016-04-12 16:00:39 -0600
commita98239dec6b20cff7b10b670c5d650538f8c3bcb (patch)
treef4d3700cec973bc1ccf913cf9743e8cbc5a649a7 /drivers/ide
parentbfd230ac4e592f3c03cabdf1e69f170a70aaeef7 (diff)
ide-disk: update to using blk_queue_write_cache()
Signed-off-by: Jens Axboe <axboe@fb.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-disk.c6
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)
static void update_flush(ide_drive_t *drive)
{
u16 *id = drive->id;
- unsigned flush = 0;
+ bool wc = false;
if (drive->dev_flags & IDE_DFLAG_WCACHE) {
unsigned long long capacity;
@@ -546,12 +546,12 @@ static void update_flush(ide_drive_t *drive)
drive->name, barrier ? "" : "not ");
if (barrier) {
- flush = REQ_FLUSH;
+ wc = true;
blk_queue_prep_rq(drive->queue, idedisk_prep_fn);
}
}
- blk_queue_flush(drive->queue, flush);
+ blk_queue_write_cache(drive->queue, wc, false);
}
ide_devset_get_flag(wcache, IDE_DFLAG_WCACHE);