loop: switch to using blk_queue_write_cache()
authorJens Axboe <axboe@fb.com>
Wed, 30 Mar 2016 16:09:35 +0000 (10:09 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 12 Apr 2016 22:00:39 +0000 (16:00 -0600)
Signed-off-by: Jens Axboe <axboe@fb.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
drivers/block/loop.c

index 423f4ca..7e5e27a 100644 (file)
@@ -937,7 +937,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
        mapping_set_gfp_mask(mapping, lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS));
 
        if (!(lo_flags & LO_FLAGS_READ_ONLY) && file->f_op->fsync)
-               blk_queue_flush(lo->lo_queue, REQ_FLUSH);
+               blk_queue_write_cache(lo->lo_queue, true, false);
 
        loop_update_dio(lo);
        set_capacity(lo->lo_disk, size);