virtio_pmem: add the missing REQ_OP_WRITE for flush bio
[linux-2.6-microblaze.git] / drivers / nvdimm / nd_virtio.c
index c6a648f..1f8c667 100644 (file)
@@ -105,7 +105,8 @@ int async_pmem_flush(struct nd_region *nd_region, struct bio *bio)
         * parent bio. Otherwise directly call nd_region flush.
         */
        if (bio && bio->bi_iter.bi_sector != -1) {
-               struct bio *child = bio_alloc(bio->bi_bdev, 0, REQ_PREFLUSH,
+               struct bio *child = bio_alloc(bio->bi_bdev, 0,
+                                             REQ_OP_WRITE | REQ_PREFLUSH,
                                              GFP_ATOMIC);
 
                if (!child)