summaryrefslogtreecommitdiffstats
path: root/drivers/block/nbd.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2016-03-30 18:10:53 +0200
committerJens Axboe <axboe@fb.com>2016-04-13 00:00:39 +0200
commitaafb1eecbb79ac135fa8028f961596333ecbb80b (patch)
tree78a76f5e776bc541c0dc999ecc64daf83e197d28 /drivers/block/nbd.c
parentmtip32xx: remove call to blk_queue_flush() (diff)
downloadlinux-aafb1eecbb79ac135fa8028f961596333ecbb80b.tar.xz
linux-aafb1eecbb79ac135fa8028f961596333ecbb80b.zip
nbd: switch 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/block/nbd.c')
-rw-r--r--drivers/block/nbd.c4
1 files changed, 2 insertions, 2 deletions
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);