From: Jens Axboe Date: Wed, 30 Mar 2016 16:10:53 +0000 (-0600) Subject: nbd: switch to using blk_queue_write_cache() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aafb1eecbb79ac135fa8028f961596333ecbb80b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git nbd: switch to using blk_queue_write_cache() Signed-off-by: Jens Axboe Reviewed-by: Christoph Hellwig --- diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 08afbc7a2bb8..31e73a7a40f2 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -693,9 +693,9 @@ static void nbd_parse_flags(struct nbd_device *nbd, struct block_device *bdev) if (nbd->flags & NBD_FLAG_SEND_TRIM) queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, nbd->disk->queue); if (nbd->flags & NBD_FLAG_SEND_FLUSH) - blk_queue_flush(nbd->disk->queue, REQ_FLUSH); + blk_queue_write_cache(nbd->disk->queue, true, false); else - blk_queue_flush(nbd->disk->queue, 0); + blk_queue_write_cache(nbd->disk->queue, false, false); } static int nbd_dev_dbg_init(struct nbd_device *nbd);