From: Jens Axboe Date: Wed, 30 Mar 2016 16:12:58 +0000 (-0600) Subject: virtio_blk: switch to using blk_queue_write_cache() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ad9126ac723f9e8ed900194d226a0608ffeae45e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git virtio_blk: switch to using blk_queue_write_cache() Signed-off-by: Jens Axboe Reviewed-by: Christoph Hellwig --- diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 28cff0d23d82..42758b52768c 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -493,11 +493,7 @@ static void virtblk_update_cache_mode(struct virtio_device *vdev) u8 writeback = virtblk_get_cache_mode(vdev); struct virtio_blk *vblk = vdev->priv; - if (writeback) - blk_queue_flush(vblk->disk->queue, REQ_FLUSH); - else - blk_queue_flush(vblk->disk->queue, 0); - + blk_queue_write_cache(vblk->disk->queue, writeback, false); revalidate_disk(vblk->disk); }